[#PoolResource-Allocate]
= xref:PoolResource.adoc[PoolResource]::Allocate
:relfileprefix: ../
:mrdocs:

Allocates a block of bytes&period; If possible the freelist is used, otherwise allocation is forwarded to &colon;&colon;operator new()&period;

== Synopsis

Declared in `&lt;support&sol;allocators&sol;pool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void*
Allocate(
    std::size&lowbar;t bytes,
    std::size&lowbar;t alignment);
----

== Return Value

Pointer to the allocated block of memory&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bytes*
| Number of bytes to allocate&period;
| *alignment*
| Required alignment in bytes for the returned block&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
