ALIGNED_ALLOC(3C) Standard C Library Functions ALIGNED_ALLOC(3C)
- aligned memory allocation
SYNOPSIS #include <stdlib.h> void * aligned_alloc
, size_t size
() function allocates size
bytes aligned on the specified
alignment boundary alignment
. The value of alignment
is constrained, it
must be a power of two and it must be greater than or equal to the size of
a word on the platform.
Upon successful completion, the aligned_alloc
() function returns a pointer
to suitably aligned memory at least size
bytes large. Otherwise, a NULL
pointer is returned and errno
is set to indicate the error.
() function will fail if:
ENOMEM The physical limits of the system are exceeded by size
bytes of memory which cannot be allocated.
EAGAIN There is not enough memory available to allocate size
bytes of memory; but the application could try again
EINVAL An invalid value for alignment
was passed in. It is not
a power of two multiple of the word size.
INTERFACE STABILITY STANDARDMT-LEVEL MT-Safe
SEE ALSO malloc(3C)
OmniOS March 26, 2016 OmniOS