[#BloombergLP-bdlma-Pool-2constructor-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/Pool.adoc[Pool]::Pool
:relfileprefix: ../../../
:mrdocs:

Create a memory pool that returns blocks of the specified size&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
Pool(
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] blockSize,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create a memory pool that returns blocks of contiguous memory of the specified `blockSize` (in bytes) for each `allocate` method invocation&period; Optionally specify a `growthStrategy` used to control the growth of internal memory chunks (from which memory blocks are dispensed)&period; If `growthStrategy` is not specified, geometric growth is used&period; Optionally specify `maxBlocksPerChunk` as the maximum chunk size if `growthStrategy` is specified&period; If geometric growth is used, the chunk size grows starting at `blockSize`, doubling in size until the size is exactly `blockSize &ast; maxBlocksPerChunk`&period; If constant growth is used, the chunk size is always `blockSize &ast; maxBlocksPerChunk`&period; If `maxBlocksPerChunk` is not specified, an implementation&hyphen;defined value is used&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `1 &lt;&equals; blockSize` and `1 &lt;&equals; maxBlocksPerChunk`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *blockSize*
| size in bytes of each allocated memory block
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


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