[#bsl-allocator_traits-0108-allocate-01] = xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-0108.adoc[allocator_traits]::allocate :relfileprefix: ../../ :mrdocs: Allocate storage for `n` objects, optionally using `hint`. == Synopsis Declared in `<bslma_allocatortraits.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:bsl/allocator_traits-0108/pointer.adoc[pointer] allocate( ALLOCATOR_TYPE& basicAllocator, xref:bsl/allocator_traits-0108/size_type.adoc[size_type] n, xref:bsl/allocator_traits-0108/const_void_pointer.adoc[const_void_pointer] hint); ---- == Description Return `basicAllocator.allocate(n, hint)`. == Return Value pointer to the allocated storage == Parameters [cols="1,4"] |=== | Name| Description | *basicAllocator* | allocator that performs the allocation | *n* | number of objects to allocate storage for | *hint* | optional locality hint for the allocation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#