[#BloombergLP-bdlma-SequentialPool] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::SequentialPool :relfileprefix: ../../ :mrdocs: Fast memory pool dispensing heterogeneous blocks from dynamic buffers. == Synopsis Declared in `<bdlma_sequentialpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlma/SequentialPool/2constructor-0251.adoc[`SequentialPool`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlma/SequentialPool/2destructor.adoc[`~SequentialPool`] [.small]#[destructor]# | Destroy this sequential pool. All memory allocated by this pool is released. | xref:BloombergLP/bdlma/SequentialPool/allocate.adoc[`allocate`] | Return a block of memory of the specified `size` (in bytes). | xref:BloombergLP/bdlma/SequentialPool/allocateAndExpand.adoc[`allocateAndExpand`] | Return a block of at least `*size` bytes and load the actual size. | xref:BloombergLP/bdlma/SequentialPool/allocator.adoc[`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. | xref:BloombergLP/bdlma/SequentialPool/deleteObject.adoc[`deleteObject`] | Destroy the specified `object`. | xref:BloombergLP/bdlma/SequentialPool/deleteObjectRaw.adoc[`deleteObjectRaw`] | Destroy the specified `object`. | xref:BloombergLP/bdlma/SequentialPool/release.adoc[`release`] | Release all memory allocated through this pool. | xref:BloombergLP/bdlma/SequentialPool/reserveCapacity.adoc[`reserveCapacity`] | Reserve at least `numBytes` of memory without further replenishment. | xref:BloombergLP/bdlma/SequentialPool/rewind.adoc[`rewind`] | Release allocated memory while retaining this pool's typical internal buffers. | xref:BloombergLP/bdlma/SequentialPool/truncate.adoc[`truncate`] | Truncate the allocation at `address` from `originalSize` to `newSize`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#