The OpenD Programming Language

SharedBorrowedRegion.allocate

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

struct SharedBorrowedRegion(uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)
shared 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