Expand description

Bump allocation.

A bump allocator is a simple and fast allocator well-suited to allocating large numbers of objects that will be deallocated en masse. However, a bump allocator cannot free individual objects; all outstanding allocations must be freed in order to reclaim memory.

Characteristics

Time complexity
OperationBest-caseWorst-case
AllocateO(1)O(1)
Deallocate allO(1)O(1)
Fragmentation

Because bump allocators can allocate blocks of any size, they suffer minimal internal fragmentation. External fragmentation becomes significant when many deallocations occur without deallocating all outstanding allocations.

Structs

A bump allocator.