[#BloombergLP-bslma-StdTestAllocator-allocate]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator]::allocate
:relfileprefix: ../../../
:mrdocs:

Allocate enough (properly aligned) space for the specified `n` objects of (template parameter) `TYPE` by calling `allocate` on the mechanism object&period; The optionally specified `hint` argument is ignored by this test allocator type&period; The behavior is undefined unless `n &lt;&equals; max&lowbar;size()`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslma/StdTestAllocator/pointer.adoc[StdTestAllocator&lt;TYPE&gt;::pointer]
allocate(
    xref:BloombergLP/bslma/StdTestAllocator/size_type.adoc[size&lowbar;type] n,
    void const* hint = 0);
----


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