Class
Allocator
Manager for allocated memory.
Allocator<TSpec>
Parameters
TSpec
The specializing type.
Metafunctions: Spec
Implements
Specializations
Chunk Pool AllocatorAllocator that pools one or more consecutive memory blocks of a specific size.
Multi Pool AllocatorAllocator that pools memory blocks.
Simple AllocatorGeneral purpose allocator.
Single Pool AllocatorAllocator that pools memory blocks of specific size.
Functions
allocateAllocates memory from heap.
clearDeallocates all memory blocks.
deallocateDeallocates memory.
Remarks
There are two reasons for using non-trivial allocators:
1. Allocators support the function clear for a fast deallocation of all allocated memory blocks.
2. Some allocators are faster in allocating an deallocating memory. Pool allocators like e.g. Single Pool Allocator or Multi Pool Allocator speed up allocate, deallocate, and clear for pooled memory blocks.
Example Programs
Include Headers
basic.h
SeqAn - Sequence Analysis Library - www.seqan.de