Browse Source

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>
Yitai Schwartz 6 years ago
parent
commit
ea1d2349fc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/stdlib/malloc-standard/malloc.h

+ 1 - 1
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