[#BloombergLP-bdls-MemoryUtil-allocate]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/MemoryUtil.adoc[MemoryUtil]::allocate
:relfileprefix: ../../../
:mrdocs:

Allocate an area of memory of the specified size `numBytes`, aligned on a page boundary&period; Return a pointer to allocated memory on success, and a null pointer otherwise&period; Note that the allocated memory is readable and writable, and read&sol;write access to this memory, if revoked, must be restored before deallocation&period;

== Synopsis

Declared in `&lt;bdls&lowbar;memoryutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void*
allocate(int numBytes);
----


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