[#bsl-allocator_traits-0108-max_size]
= xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-0108.adoc[allocator&lowbar;traits]::max&lowbar;size
:relfileprefix: ../../
:mrdocs:

Return the maximum number of objects `allocate` can return&period;

== Synopsis

Declared in `&lt;bslma&lowbar;allocatortraits&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:bsl/allocator_traits-0108/size_type.adoc[size&lowbar;type]
max&lowbar;size(ALLOCATOR&lowbar;TYPE const& basicAllocator) noexcept;
----

== Description

Return the largest number of `value&lowbar;type` objects that could reasonably be returned by a single invocation of `allocate` for the specified `allocator`, i&period;e&period;, `allocator&period;max&lowbar;size()`&period;

== Return Value

largest number of objects that can reasonably be allocated

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator whose maximum size is queried
|===


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