PoolResource::Allocate

Allocates a block of bytes. If possible the freelist is used, otherwise allocation is forwarded to ::operator new().

Synopsis

Declared in <support/allocators/pool.h>

void*
Allocate(
    std::size_t bytes,
    std::size_t alignment);

Return Value

Pointer to the allocated block of memory.

Parameters

NameDescription
bytesNumber of bytes to allocate.
alignmentRequired alignment in bytes for the returned block.