std.experimental.allocator.building_blocks.aligned_block_list

AlignedBlockList represents a wrapper around a chain of allocators, allowing for fast deallocations and preserving a low degree of fragmentation by means of aligned allocations.

Members

Structs

AlignedBlockList
struct AlignedBlockList(Allocator, ParentAllocator, ulong theAlignment = (1 << 21))

AlignedBlockList represents a wrapper around a chain of allocators, allowing for fast deallocations and preserving a low degree of fragmentation. The allocator holds internally a doubly linked list of Allocator objects, which will serve allocations in a most-recently-used fashion. Most recent allocators used for allocate calls, will be moved to the front of the list.

SharedAlignedBlockList
struct SharedAlignedBlockList(Allocator, ParentAllocator, ulong theAlignment = (1 << 21))

SharedAlignedBlockList is the threadsafe version of AlignedBlockList. The Allocator template parameter must refer a shared allocator. Also, ParentAllocator must be a shared allocator, supporting alignedAllocate.

Meta