stdx.allocator.building_blocks.region

Members

Structs

InSituRegion
struct InSituRegion(size_t size, size_t minAlign = platformAlignment)

InSituRegion is a convenient region that carries its storage within itself (in the form of a statically-sized array).

Region
struct Region(ParentAllocator = NullAllocator, uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)

A Region allocator allocates memory straight from one contiguous chunk. There is no deallocation, and once the region is full, allocation requests return null. Therefore, Regions are often used (a) in conjunction with more sophisticated allocators; or (b) for batch-style very fast allocations that deallocate everything at once.

SbrkRegion
struct SbrkRegion(uint minAlign = platformAlignment)

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.

Meta