Region.allocate

Allocates n bytes of memory. The shortest path involves an alignment adjustment (if alignment > 1), an increment, and a comparison.

struct Region(ParentAllocator = NullAllocator, uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)
void[]
allocate
(
size_t n
)

Parameters

n size_t

number of bytes to allocate

Return Value

Type: void[]

A properly-aligned buffer of size n or null if request could not be satisfied.

Meta