Mallocator.allocate

Allocates size bytes of memory.

class Mallocator
void[]
allocate
(
size_t size
)

Parameters

size size_t

Amount of memory to allocate.

Return Value

Type: void[]

The pointer to the new allocated memory.

Examples

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

assert(p.length == 20);

Mallocator.instance.deallocate(p);

Meta