The OpenD Programming Language

SharedBorrowedRegion.alignedAllocate

Allocates n bytes of memory aligned at alignment a.

struct SharedBorrowedRegion(uint minAlign = platformAlignment, Flag!"growDownwards" growDownwards = No.growDownwards)
shared pure nothrow @trusted @nogc
void[]
alignedAllocate
(
size_t n
,
uint a
)

Parameters

n size_t

number of bytes to allocate

a uint

alignment for the allocated block

Return Value

Type: void[]

Either a suitable block of n bytes aligned at a, or null.

Meta