template<class RawAllocator = default_allocator, unsigned Num = 2, unsigned Den = 1>
class foonathan::memory::growing_block_allocator< RawAllocator, Num, Den >
A BlockAllocator that uses a given RawAllocator for allocating the blocks.
It calls the allocate_array()
function with a node of size 1
and maximum alignment on the used allocator for the block allocation. The size of the next memory block will grow by a given factor after each allocation, allowing an amortized constant allocation time in the higher level allocator. The factor can be given as rational in the template parameter, default is 2
.