[#BloombergLP-bdlma-SequentialPool]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::SequentialPool
:relfileprefix: ../../
:mrdocs:

Fast memory pool dispensing heterogeneous blocks from dynamic buffers&period;

== Synopsis

Declared in `&lt;bdlma&lowbar;sequentialpool&period;h&gt;`

[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&hyphen;specified sizes) from a sequence of dynamically&hyphen;allocated internal buffers&period; Memory for the internal buffers is supplied by an (optional) allocator supplied at construction&semi; if no allocator is supplied, the currently installed default allocator is used&period; 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&period; This class is _exception_ _neutral_&colon; If memory cannot be allocated, the behavior is defined by the (optional) allocator specified at construction&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/SequentialPool/2constructor-0251.adoc[`SequentialPool`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlma/SequentialPool/2destructor.adoc[`&#126;SequentialPool`] [.small]#[destructor]#
| Destroy this sequential pool&period; All memory allocated by this pool is released&period;
| xref:BloombergLP/bdlma/SequentialPool/allocate.adoc[`allocate`] 
| Return a block of memory of the specified `size` (in bytes)&period;
| xref:BloombergLP/bdlma/SequentialPool/allocateAndExpand.adoc[`allocateAndExpand`] 
| Return a block of at least `&ast;size` bytes and load the actual size&period;
| xref:BloombergLP/bdlma/SequentialPool/allocator.adoc[`allocator`] 
| Return the allocator used by this object to allocate memory&period; Note that this allocator can not be used to deallocate memory allocated through this pool&period;
| xref:BloombergLP/bdlma/SequentialPool/deleteObject.adoc[`deleteObject`] 
| Destroy the specified `object`&period;
| xref:BloombergLP/bdlma/SequentialPool/deleteObjectRaw.adoc[`deleteObjectRaw`] 
| Destroy the specified `object`&period;
| xref:BloombergLP/bdlma/SequentialPool/release.adoc[`release`] 
| Release all memory allocated through this pool&period;
| xref:BloombergLP/bdlma/SequentialPool/reserveCapacity.adoc[`reserveCapacity`] 
| Reserve at least `numBytes` of memory without further replenishment&period;
| xref:BloombergLP/bdlma/SequentialPool/rewind.adoc[`rewind`] 
| Release allocated memory while retaining this pool&apos;s typical internal buffers&period;
| xref:BloombergLP/bdlma/SequentialPool/truncate.adoc[`truncate`] 
| Truncate the allocation at `address` from `originalSize` to `newSize`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
