Allocator.allocate

Attempts to allocate a memory block of size bytes.

If size == 0, the returned slice might have a null .ptr, but either way it can be safely deallocated.

interface Allocator
nothrow
void[]
allocate
(
size_t size
)
out (mem; mem.ptr == null || mem.length == size)

Return Value

Type: void[]

The allocated memory block, or null on allocation failure.