Function Mallocator.allocate

Allocates size bytes of memory.

void[] allocate (
  ulong size
);

Parameters

NameDescription
size Amount of memory to allocate.

Returns

The pointer to the new allocated memory.

Example

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

assert(p.length == 20);

Mallocator.instance.deallocate(p);