瀏覽代碼

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 7 年之前
父節點
當前提交
ea1d2349fc
共有 1 個文件被更改,包括 1 次插入1 次删除
  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