#include <oskit/com/mem.h>oskit_error_t oskit_mem_alloc_aligned(oskit_mem_t *m, oskit_u32_t size, oskit_u32_t flags, oskit_u32_t align);
Allocate a chunk of memory of size bytes, subject to various options specified in flags, and an alignment constraint specifed by align. The alignment constraint is a power of two integer, which indicates the minimum required alignment for the new chunk. If successful, a pointer to the new chunk of memory is returned. Othersize a NULL pointer is returned. The new memory must be deallocated with the free method described below.
- m
- The memory object to operate on.
- size
- The size (in bytes) of the chunk to allocate.
- flags
- Allocation options and constraints.
- align
- The alignment constraint for the new chunk.
Returns a pointer to the chunk of memory on success, or NULL if the request could not be satisfied.