Hash :
419322ec
Author :
Date :
2020-11-04T02:19:08
posix_memalign: New module. * lib/stdlib.in.h (posix_memalign): New declaration. * lib/posix_memalign.c: New file. * m4/posix_memalign.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether posix_memalign is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_POSIX_MEMALIGN, HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN. * modules/stdlib (Makefile.am): Substitute GNULIB_POSIX_MEMALIGN, HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN. * modules/posix_memalign: New file. * tests/test-stdlib-c++.cc (posix_memalign): Check signature. * doc/posix-functions/posix_memalign.texi: Mention the new module and the OpenBSD bug.
@node posix_memalign
@section @code{posix_memalign}
@findex posix_memalign
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.html}
Gnulib module: posix_memalign
Portability problems fixed by Gnulib:
@itemize
@item
This function produces misaligned results on some platforms:
OpenBSD 6.1.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
Mac OS X 10.5, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.1.
@end itemize
The Gnulib module @code{aligned-malloc} provides functions for
allocating and freeing blocks of suitably aligned memory.
The Gnulib module @code{pagealign_alloc} provides a similar API for
allocating and freeing blocks of memory aligned on a system page boundary.