#include <oskit/c/malloc.h>void *smemalign(size_t alignment, size_t size);
Identical to memalign except that the user must keep track of the size of the allocated chunk and pass that size to sfree when releasing the chunk.Allocates uninitialized memory with the specified byte alignment; e.g., an alignment value of 32 will return a block aligned on a 32-byte boundary. Calls smemalignf with flags value zero to allocate the memory.
Note that the alignment is not the same as used by the underlying LMM routines. The alignment parameter in LMM calls is the number of low-order bits that should be zero in the returned pointer.
- alignment
- Desired byte-alignment of the returned block.
- size
- Size in bytes of desired allocation.
Returns a pointer to the allocated memory or zero if none.