ConservativeGC.malloc

void *malloc malloc(size_t size, uint bits = 0, const TypeInfo ti = null) nothrow

Requests an aligned block of managed memory from the garbage collector.

Parameters

sizeThe desired allocation size in bytes.
bitsA bitmask of the attributes to set on this block.
tiTypeInfo to describe the memory.

Returns

A reference to the allocated memory or null if no memory was requested.

Throws

OutOfMemoryError on allocation failure