[#BloombergLP-bsltf-StdTestAllocator-05-allocate] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::xref:BloombergLP/bsltf/StdTestAllocator-05.adoc[StdTestAllocator]::allocate :relfileprefix: ../../../ :mrdocs: Allocate enough (properly aligned) space for the specified `numElements` of type `T`. If the configured delegate allocator is unable to fulfill the allocation request, an exception (typically `bsl::bad_alloc`) will be thrown. The behavior is undefined unless `numElements <= max_size()`. == Synopsis Declared in `<bsltf_stdtestallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bsltf/StdTestAllocator-05/pointer.adoc[StdTestAllocator<TYPE>::pointer] allocate(xref:BloombergLP/bsltf/StdTestAllocator-05/size_type.adoc[size_type] numElements); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#