diff options
author | Denys Vlasenko | 2011-06-03 21:39:42 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-06-03 21:39:42 +0200 |
commit | fe86d6b6361d07529288fa20aa5cab5472b64344 (patch) | |
tree | 289a0fb811f8f0deac205ed3b1bc2babab8a0401 | |
parent | 71d73136250efa7dd5b5b023df76487f6e723830 (diff) | |
download | busybox-fe86d6b6361d07529288fa20aa5cab5472b64344.zip busybox-fe86d6b6361d07529288fa20aa5cab5472b64344.tar.gz |
appletlib.c: do not use PAGE_SIZE for malloc tweaking
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/appletlib.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 0dac0ba..1bc45c4 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -34,17 +34,6 @@ # include <malloc.h> /* for mallopt */ #endif -/* Try to pull in PAGE_SIZE */ -#ifdef __linux__ -# include <sys/user.h> -#endif -#ifdef __GNU__ /* Hurd */ -# include <mach/vm_param.h> -#endif -#ifndef PAGE_SIZE -# define PAGE_SIZE (4*1024) /* guess */ -#endif - /* Declare <applet>_main() */ #define PROTOTYPES @@ -788,13 +777,13 @@ int main(int argc UNUSED_PARAM, char **argv) * to keep before releasing to the OS * Default is way too big: 256k */ - mallopt(M_TRIM_THRESHOLD, 2 * PAGE_SIZE); + mallopt(M_TRIM_THRESHOLD, 8 * 1024); #endif #ifdef M_MMAP_THRESHOLD /* M_MMAP_THRESHOLD is the request size threshold for using mmap() * Default is too big: 256k */ - mallopt(M_MMAP_THRESHOLD, 8 * PAGE_SIZE - 256); + mallopt(M_MMAP_THRESHOLD, 32 * 1024 - 256); #endif #if !BB_MMU |