[#BloombergLP-bdlma-Multipool-allocate] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/Multipool.adoc[Multipool]::allocate :relfileprefix: ../../../ :mrdocs: Return a contiguous block of maximally‐aligned memory of at least `size`. == Synopsis Declared in `<bdlma_multipool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void* allocate(xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] size); ---- == Description Return the address of a contiguous block of maximally‐aligned memory of (at least) the specified `size` (in bytes). If `size` is 0, no memory is allocated and 0 is returned. If `size > maxPooledBlockSize()`, the memory allocation is managed directly by the underlying allocator, and will not be pooled, but will be deallocated when the `release` method is called, or when this object is destroyed. == Return Value address of the newly allocated block, or a null pointer if `size` is 0 == Parameters [cols="1,4"] |=== | Name| Description | *size* | number of bytes to allocate |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#