[#BloombergLP-bsltf-StdTestAllocator_CommonUtil-maxSize]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::xref:BloombergLP/bsltf/StdTestAllocator_CommonUtil.adoc[StdTestAllocator&lowbar;CommonUtil]::maxSize
:relfileprefix: ../../../
:mrdocs:

Return the maximum number of objects of the specified size&period;

== Synopsis

Declared in `&lt;bsltf&lowbar;stdtestallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
size&lowbar;t
maxSize(size&lowbar;t elementSize);
----

== Description

Return the maximum number of objects, each taking the specified `elementSize` bytes of storage, that can potentially be allocated by a `StdTestAllocator`&period; Note that this function is mostly about insulating consumers of this component from a standard header, so that this test component does not hide missing header dependencies in testing scenarios&period;

== Return Value

the maximum number of objects of size `elementSize`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *elementSize*
| size in bytes of each object
|===


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