| Updated: October 28, 2024 |
Allocate aligned memory
#include <malloc.h>
void *memalign( size_t alignment,
size_t size );
libc
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.
A pointer to the allocated block, or NULL if an error occurred (errno is set).
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |