* doc/posix-functions/posix_memalign.texi: Refer to the pagealign_alloc
module.
* lib/pagealign_alloc.c (pagealign_alloc): Add comment.
+2011-11-25 Bruno Haible <bruno@clisp.org>
+
+ pagealign_alloc: Doc and comments.
+ * doc/posix-functions/posix_memalign.texi: Refer to the pagealign_alloc
+ module.
+ * lib/pagealign_alloc.c (pagealign_alloc): Add comment.
+
2011-11-25 Jim Meyering <meyering@redhat.com>
test-update-copyright.sh: avoid false-positive failure
MacOS 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, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
@end itemize
+
+The Gnulib module @code{pagealign_alloc} provides a similar API
+that returns memory aligned on a system page boundary.
pagealign_alloc (size_t size)
{
void *ret;
+ /* We prefer the mmap() approach over the posix_memalign() or malloc()
+ based approaches, since the latter often waste an entire memory page
+ per call. */
#if HAVE_MMAP
# ifdef HAVE_MAP_ANONYMOUS
const int fd = -1;