size bytes with at least the requested
alignment and uninitialised contents, or the null slice on failure.
void[] allocate(size_t size, size_t alignment = (void *).sizeof * 2) const nothrow @nogcRequests a block from the hook.
The request is valid when size is at least 1 and alignment is a power of two; anything else (a zero size, an alignment of 0 or a non-power-of-two alignment) is a request that cannot be met. Invalid requests and unsatisfiable valid ones are indistinguishable by design: callers know their sizes and skip the call for empty ones.
size | exact number of bytes to obtain; 0 is never served. |
alignment | power-of-two alignment of the returned address; defaults to (void*).sizeof * 2. |
size bytes with at least the requested
alignment and uninitialised contents, or the null slice on failure.