BloombergLP::bdls::MemoryUtil::allocate

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

Synopsis

Declared in <bdls_memoryutil.h>

static
void*
allocate(int numBytes);