![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
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 | Yes |
| Thread | Yes |
free(), malloc(), posix_memalign()
![]() |
![]() |
![]() |
![]() |