SharedRegion.allocate

Allocates n bytes of memory. The allocation is served by atomically incrementing a pointer which keeps track of the current used space.

struct SharedRegion(ParentAllocator, uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)
pure nothrow @trusted @nogc
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