Allocate aligned memory
#include <malloc.h> void *memalign( size_t alignment, size_t size );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The memalign() function allocates size bytes aligned on a boundary specified by alignment.
|Because the malloc() implementation uses signed, 32-bit integers to represent the size internally, you can't allocate more than 2 GB in a single allocation. If the size is greater than 2 GB, memalign() indicates an error of ENOMEM.|
A pointer to the allocated block, or NULL if an error occurred (errno is set).
free(), malloc(), posix_memalign()