SharedAscendingPageAllocator.alignedAllocate

Rounds the allocation size to the next multiple of the page size. The allocation only reserves a range of virtual pages but the actual physical memory is allocated on demand, when accessing the memory.

The allocated memory is aligned to the specified alignment a.

struct SharedAscendingPageAllocator
nothrow @nogc
void[]
alignedAllocate
(
size_t n
,
uint a
)

Parameters

n size_t

Bytes to allocate

a uint

Alignment

Return Value

Type: void[]

null on failure or if the requested size exceeds the remaining capacity.

Meta