Fast memory pool dispensing heterogeneous blocks from dynamic buffers.
Declared in <bdlma_sequentialpool.h>
class SequentialPool;
This class implements a fast memory pool that efficiently dispenses heterogeneous blocks of memory (of varying, user-specified sizes) from a sequence of dynamically-allocated internal buffers. Memory for the internal buffers is supplied by an (optional) allocator supplied at construction; if no allocator is supplied, the currently installed default allocator is used. If an allocation exceeds the remaining free memory space in the current buffer, the pool replenishes its internal buffer with new memory to satisfy the request. This class is exception neutral: If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction.
| Name | Description |
|---|---|
SequentialPool [constructor] | Constructors |
~SequentialPool [destructor] | Destroy this sequential pool. All memory allocated by this pool is released. |
allocate | Return a block of memory of the specified size (in bytes). |
allocateAndExpand | Return a block of at least *size bytes and load the actual size. |
allocator | Return the allocator used by this object to allocate memory. Note that this allocator can not be used to deallocate memory allocated through this pool. |
deleteObject | Destroy the specified object. |
deleteObjectRaw | Destroy the specified object. |
release | Release all memory allocated through this pool. |
reserveCapacity | Reserve at least numBytes of memory without further replenishment. |
rewind | Release allocated memory while retaining this pool's typical internal buffers. |
truncate | Truncate the allocation at address from originalSize to newSize. |