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

Reserve capacity for at least `numObjects` blocks from this pool&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
reserveCapacity(int numObjects);
----

== Description

Reserve memory from this pool to satisfy memory requests for at least the specified `numObjects` before the pool replenishes&period; The behavior is undefined unless `0 &lt;&equals; numObjects`&period; Return 0 on success and the number of objects that could not be reserved otherwise&period; Note that this method fails if the number of memory blocks already allocated plus `numObjects` exceeds `poolSize()`&period;

== Return Value

0 on success, or the number of objects that could not be reserved

== Parameters

[cols="1,4"]
|===
| Name| Description
| *numObjects*
| minimum number of objects to reserve
|===


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