The OpenD Programming Language

std.experimental.allocator.building_blocks.region

Members

Structs

BorrowedRegion
struct BorrowedRegion(uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)

A BorrowedRegion allocates directly from a user-provided block of memory.

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, 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.
SharedBorrowedRegion
struct SharedBorrowedRegion(uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)

A SharedBorrowedRegion allocates directly from a user-provided block of memory.

SharedRegion
struct SharedRegion(ParentAllocator, 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