std.experimental.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)
Undocumented in source.
SharedRegion
struct SharedRegion(ParentAllocator = NullAllocator, uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)

The threadsafe version of the Region allocator. Allocations and deallocations are lock-free based using core.atomic.cas.

Meta

Suggestion Box / Bug Report