aligned_alloc
aligned_alloc
Defined in header <stdlib.h> | ||
---|---|---|
void *aligned_alloc( size_t alignment, size_t size ); | (since C11) |
Allocate size
bytes of uninitialized storage whose alignment is specified by alignment
. The size
parameter must be an integral multiple of alignment
.
aligned_alloc
is thread-safe: it behaves as though only accessing the memory locations visible through its argument, and not any static storage.