Fast memory pool dispensing heterogeneous blocks from dynamic buffers.
Synopsis
Declared in <bdlma_sequentialpool.h>
class SequentialPool;
Description
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.
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this sequential pool. All memory allocated by this pool is released. |
Return a block of memory of the specified |
|
Return a block of at least |
|
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. |
|
Destroy the specified |
|
Destroy the specified |
|
Release all memory allocated through this pool. |
|
Reserve at least |
|
Release allocated memory while retaining this pool's typical internal buffers. |
|
Truncate the allocation at |
Created with MrDocs