[#bsl-allocator-050-allocate-07]
= xref:bsl.adoc[bsl]::xref:bsl/allocator-050.adoc[allocator&lt;UserFieldValue&gt;]::allocate
:relfileprefix: ../../
:mrdocs:

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:bsl/allocator-050/pointer.adoc[pointer]
allocate(
    xref:bsl/allocator-050/size_type.adoc[size&lowbar;type] n,
    void const* hint = 0);
----

== Return Value

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====

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