Function MmapPool.allocate

Allocates size bytes of memory.

void[] allocate (
  ulong size
) nothrow @nogc @trusted;

Parameters

NameDescription
size Amount of memory to allocate.

Returns

The pointer to the new allocated memory.

Example

auto p = MmapPool.instance.allocate(20);

assert(p);

MmapPool.instance.deallocate(p);