[#BloombergLP-bdlma-ConcurrentPoolAllocator-allocate-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/ConcurrentPoolAllocator.adoc[ConcurrentPoolAllocator]::allocate
:relfileprefix: ../../../
:mrdocs:

Return a newly allocated block of memory of (at least) `size` bytes&period;

== Synopsis

Declared in `&lt;bdlma&lowbar;concurrentpoolallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
void*
allocate(xref:BloombergLP/bdlma/ConcurrentPoolAllocator/size_type.adoc[size&lowbar;type] size) override;
----

== Description

Return a newly allocated block of memory of (at least) the specified positive `size` (in bytes), and having alignment conforming to the platform requirement for any object having `size` bytes&period; If `size` is 0, a null pointer is returned with no effect&period; If the block size is not supplied at construction, then the `size` specified in the first call to this method fixes the block size&period; If `size` is greater than the value returned by `blockSize`, the allocation request will be satisfied directly by the external allocator supplied at construction (or the default allocator, if no allocator was supplied)&period;

== 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]#
