Class Specialization
Chunk Pool Allocator
Allocator that pools one or more consecutive memory blocks of a specific size.
Allocator
Allocator
Chunk Pool Allocator
Allocator< ChunkPool<SIZE, MAX_COUNT, ParentAllocator> >
Include Headers
seqan/basic.h
Parameters
SIZE
Size of memory blocks that are pooled.
Values: An unsigned integer with SIZE >= sizeof(void *).
MAX_COUNT
Maximum number of consecutive memory blocks that are pooled.
Default: 26
Remarks: Longer "chunks" are allocated and deallocated without pooling.
ParentAllocator
An allocator that is by the pool allocator used to allocate memory.
Note: The multi pool allocator only supports clear if this function is also implemented for ParentAllocator.
Remarks
A pool allocator allocates several memory blocks at once. Freed blocks are not immediately deallocated but recycled in subsequential allocations. This way, the number of calls to the heap manager is reduced, and that speeds up memory management.
Note that memory blocks of size different than SIZE, 2*SIZE, 3*SIZE, ..., MAX_COUNT * SIZE are not pooled but immediately allocated and deallocated using ParentAllocator.
Specialization of
Implements
Functions
allocateAllocates memory from heap. (Allocator)
clearDeallocates all memory blocks. (Allocator)
clearDeallocates all memory blocks. (Allocator)
deallocateDeallocates memory. (Allocator)
Example Programs
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2011/02/08 21:37:11