stdx.allocator.building_blocks.free_list

Members

Structs

ContiguousFreeList
struct ContiguousFreeList(ParentAllocator, size_t minSize, size_t maxSize = minSize)

Free list built on top of exactly one contiguous block of memory. The block is assumed to have been allocated with ParentAllocator, and is released in ContiguousFreeList's destructor (unless ParentAllocator is NullAllocator).

FreeList
struct FreeList(ParentAllocator, size_t minSize, size_t maxSize = minSize, Flag!"adaptive" adaptive = No.adaptive)

Free list allocator, stackable on top of another allocator. Allocation requests between min and max bytes are rounded up to max and served from a singly-linked list of buffers deallocated in the past. All other allocations are directed to ParentAllocator. Due to the simplicity of free list management, allocations from the free list are fast.

SharedFreeList
struct SharedFreeList(ParentAllocator, size_t minSize, size_t maxSize = minSize, size_t approxMaxNodes = unbounded)

FreeList shared across threads. Allocation and deallocation are lock-free. The parameters have the same semantics as for FreeList.

Meta