[#bsl-allocator-0df-allocate] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0df.adoc[allocator]::allocate :relfileprefix: ../../ :mrdocs: Return a block of memory having sufficient size and alignment to hold the specified `n` objects of `value_type`, allocated from the memory resource held by this allocator. Optionally specify a `hint`, which is ignored by this allocator type but theoretically used by other allocators as an aid for optimizing locality. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] xref:bsl/allocator-0df/pointer.adoc[allocator<TYPE>::pointer] allocate( xref:bsl/allocator-0df/size_type.adoc[size_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]#