|
Embedded Artistry libmemory
Memory library for embedded systems (malloc and friends)
|

Go to the source code of this file.
Macros | |
| #define | IS_POWER_2(x) (!((x) & ((x)-1))) |
Functions | |
| int | posix_memalign (void **__memptr, size_t __alignment, size_t __size) |
| #define IS_POWER_2 | ( | x | ) | (!((x) & ((x)-1))) |
Definition at line 6 of file posix_memalign.c.
| int posix_memalign | ( | void ** | memptr, |
| size_t | alignment, | ||
| size_t | size | ||
| ) |
Posix Memory Alignment Extension
Generated aligned memory. This function forwards the request to aligned malloc. Allocated memory must be freed with aligned_free().
| memptr | A pointer to the pointer which will store the aligned memory. The memory must be freed with aligned_free(). memptr must not be NULL. |
| alignment | The target alignment for the memory. Must be a power of 2. |
| size | The size of the allocation. Must be > 0. |
memptr is not NULL. alignment is power-of-2. size > 0.Definition at line 8 of file posix_memalign.c.
References aligned_malloc(), and IS_POWER_2.