Explorar el Código

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 hace 6 años
padre
commit
ea1d2349fc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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