[#BloombergLP-bdlma-ConcurrentMultipool] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::ConcurrentMultipool :relfileprefix: ../../ :mrdocs: Thread‐safe multipool that manages memory via size‐tiered pools. == Synopsis Declared in `<bdlma_concurrentmultipool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ConcurrentMultipool; ---- == Description This class implements a memory manager that maintains a configurable number of `bdlma::Pool` objects, each dispensing memory blocks of a unique size. The `Pool` objects are placed in an array, with each successive pool managing memory blocks of size twice that of the previous pool. Each multipool allocation (deallocation) request allocates memory from (returns memory to) the internal pool having the smallest block size not less than the requested size, or, if no pool manages memory blocks of sufficient sized, from a separately managed list of memory blocks. Both the `release` method and the destructor of a `bdema::Multipool` release all memory currently allocated via the object. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlma/ConcurrentMultipool/2constructor-055.adoc[`ConcurrentMultipool`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlma/ConcurrentMultipool/2destructor.adoc[`~ConcurrentMultipool`] [.small]#[destructor]# | Destroy this multipool. All memory allocated from this memory pool is released. | xref:BloombergLP/bdlma/ConcurrentMultipool/allocate.adoc[`allocate`] | Return a contiguous block of maximally‐aligned memory of at least `size`. | xref:BloombergLP/bdlma/ConcurrentMultipool/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/ConcurrentMultipool/deallocate.adoc[`deallocate`] | Relinquish the memory block at `address` back to this multipool. | xref:BloombergLP/bdlma/ConcurrentMultipool/deleteObject.adoc[`deleteObject`] | Destroy and deallocate `object` using its dynamic type. | xref:BloombergLP/bdlma/ConcurrentMultipool/deleteObjectRaw.adoc[`deleteObjectRaw`] | Destroy and deallocate `object` using its static type. | xref:BloombergLP/bdlma/ConcurrentMultipool/maxPooledBlockSize.adoc[`maxPooledBlockSize`] | Return the maximum size of memory blocks pooled by this multipool. | xref:BloombergLP/bdlma/ConcurrentMultipool/numPools.adoc[`numPools`] | Return the number of pools managed by this multipool object. | xref:BloombergLP/bdlma/ConcurrentMultipool/release.adoc[`release`] | Relinquish all memory currently allocated via this multipool object. | xref:BloombergLP/bdlma/ConcurrentMultipool/reserveCapacity.adoc[`reserveCapacity`] | Reserve capacity for at least `numBlocks` blocks of the specified `size`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#