Rounds the given size to a multiple of thew alignment
The deallocate method only works (and returns true) on systems that support reducing the break address (i.e. accept calls to sbrk with negative offsets). OSX does not accept such. In addition the argument must be the last block allocated.
The deallocateAll method only works (and returns true) on systems that support reducing the break address (i.e. accept calls to sbrk with negative offsets). OSX does not accept such.
Standard allocator API.
The expand method may only succeed if the argument is the last block allocated. In that case, expand attempts to push the break pointer to the right.
Rounds the given size to a multiple of thew alignment
The expand method may only succeed if the argument is the last block allocated. In that case, expand attempts to push the break pointer to the right.
Instance shared by all callers.
Standard allocator primitives.
Allocator backed by $(LINK2 https://en.wikipedia.org/wiki/Sbrk, sbrk) for Posix systems. Due to the fact that sbrk is not thread-safe by design, SbrkRegion uses a mutex internally. This implies that uncontrolled calls to brk and sbrk may affect the workings of SbrkRegion adversely.