[#bsl-allocator_traits-05e-allocate-04] = xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-05e.adoc[allocator_traits<allocator<TYPE>>]::allocate :relfileprefix: ../../ :mrdocs: `allocate` overloads == Synopses Declared in `<bslma_bslallocator.h>` Allocate storage for `n` objects using the specified `m` allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:bsl/allocator_traits-05e/pointer.adoc[pointer] xref:bsl/allocator_traits-05e/allocate-07.adoc[allocate]( xref:bsl/allocator_traits-05e/allocator_type.adoc[allocator_type]& m, xref:bsl/allocator_traits-05e/size_type.adoc[size_type] n); ---- [.small]#xref:bsl/allocator_traits-05e/allocate-07.adoc[_» more..._]# Allocate storage for `n` objects, optionally using `hint`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:bsl/allocator_traits-05e/pointer.adoc[pointer] xref:bsl/allocator_traits-05e/allocate-0f.adoc[allocate]( xref:bsl/allocator_traits-05e/allocator_type.adoc[allocator_type]& m, xref:bsl/allocator_traits-05e/size_type.adoc[size_type] n, xref:bsl/allocator_traits-05e/const_void_pointer.adoc[const_void_pointer] hint); ---- [.small]#xref:bsl/allocator_traits-05e/allocate-0f.adoc[_» more..._]# == Return Value pointer to the allocated storage == Parameters [cols="1,4"] |=== | Name| Description | *m* | allocator that performs the allocation | *n* | number of objects to allocate storage for | *hint* | optional locality hint (ignored) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#