[#bsl-allocator-0a-max_size] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0a.adoc[allocator<void>]::max_size :relfileprefix: ../../ :mrdocs: Return the maximum number of elements allocatable by this allocator. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:bsl/allocator-0df.adoc[size_type] max_size() const; ---- == Description Return the maximum number of elements of (template parameter) `TYPE` that can be allocated using this allocator in a single call to `allocate`. Note that there is no guarantee that attempts at allocating fewer elements than the value returned by `max_size` will not throw. == Return Value maximum number of elements allocatable by this allocator [.small]#Created with https://www.mrdocs.com[MrDocs]#