Mimallocator.alignedAllocate

Allocates the size expressed in bytes aligned by alignment.

struct Mimallocator
@trusted @nogc pure nothrow
void[]
alignedAllocate
shared
(
size_t bytes
,
)

Parameters

bytes
Type: size_t

Number of bytes to allocate.

alignment
Type: uint

the minimal alignment of the allocated memory.

Return Value

Type: void[]

An array with aligned allocated memory or null if out of memory. Returns null if called with size 0.

Meta