Next: alphasort
, Previous: alarm
, Up: ISO C and POSIX Function Substitutes [Contents][Index]
aligned_alloc
Documentation:
man aligned_alloc
Gnulib module: aligned_alloc
Portability problems fixed by Gnulib:
sizeof (void *)
on some platforms:
macOS 14, AIX 7.3.1.
Portability problems not fixed by Gnulib:
aligned_alloc
crashes if the requested size is
not a multiple of the alignment:
AddressSanitizer (gcc 11.2 or clang 13).
Gnulib has partial substitutes for aligned_alloc
that do not crash even if the AddressSanitizer bug is present:
alignalloc
provides a portable function
alignalloc
that is a near-substitute for glibc
aligned_alloc
, except that the result must be freed
with alignfree
rather than plain free
.
aligned-malloc
provides functions for
allocating and freeing blocks of suitably aligned memory.
pagealign_alloc
provides a similar API for
allocating and freeing blocks of memory aligned on a system page boundary.