summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-standard
diff options
context:
space:
mode:
authorYitai Schwartz <yitai27@gmail.com>2017-10-28 02:11:10 +0300
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-11-03 20:20:45 +0100
commitea1d2349fcff7b68d8473aee4a3e2a301e838bc6 (patch)
treed6336aee550253b5d5ba490a3de44e293215bba5 /libc/stdlib/malloc-standard
parentc7e82668bd23fbdd02ebe1e83ff2bb6877812423 (diff)
malloc-standard/malloc.h: use getpagesize
sysconf creates a lot of code dependencies. getpagesize dosen't. staticly linked code that calls malloc is now much smaller. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'libc/stdlib/malloc-standard')
-rw-r--r--libc/stdlib/malloc-standard/malloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
index f3e2d2a2a..44120d388 100644
--- a/libc/stdlib/malloc-standard/malloc.h
+++ b/libc/stdlib/malloc-standard/malloc.h
@@ -138,7 +138,7 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock)
*/
#ifndef malloc_getpagesize
# include <unistd.h>
-# define malloc_getpagesize sysconf(_SC_PAGESIZE)
+# define malloc_getpagesize getpagesize()
#else /* just guess */
# define malloc_getpagesize (4096)
#endif