projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: use ASCII in .texi files where UTF-8 isn't needed
[gnulib.git]
/
lib
/
pagealign_alloc.c
diff --git
a/lib/pagealign_alloc.c
b/lib/pagealign_alloc.c
index
f02f84e
..
94a85fc
100644
(file)
--- a/
lib/pagealign_alloc.c
+++ b/
lib/pagealign_alloc.c
@@
-1,6
+1,6
@@
/* Memory allocation aligned to system page boundaries.
/* Memory allocation aligned to system page boundaries.
- Copyright (C) 2005
, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
+ Copyright (C) 2005
-2007, 2009-2014
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-123,6
+123,9
@@
void *
pagealign_alloc (size_t size)
{
void *ret;
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;
#if HAVE_MMAP
# ifdef HAVE_MAP_ANONYMOUS
const int fd = -1;