diff options
author | Ron Yorston <rmy@pobox.com> | 2016-10-19 17:01:55 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-10-19 17:01:55 +0100 |
commit | 075814c60a316cfd088c88f26f75ab21b5850b98 (patch) | |
tree | f6e33ac693630827deb309faa5fa4931588db57d /libbb/appletlib.c | |
parent | 977d65c1bbc57f5cdd0c8bfd67c8b5bb1cd390dd (diff) | |
parent | f37e1155aabde6bd95d267a8aec347cedccb8bc3 (diff) | |
download | busybox-w32-075814c60a316cfd088c88f26f75ab21b5850b98.tar.gz busybox-w32-075814c60a316cfd088c88f26f75ab21b5850b98.tar.bz2 busybox-w32-075814c60a316cfd088c88f26f75ab21b5850b98.zip |
Merge branch busybox (up to "ash: comment out free(p) just before...")
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 28adf2740..4aa40454f 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -930,7 +930,9 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv) | |||
930 | } | 930 | } |
931 | if (ENABLE_FEATURE_SUID) | 931 | if (ENABLE_FEATURE_SUID) |
932 | check_suid(applet_no); | 932 | check_suid(applet_no); |
933 | exit(applet_main[applet_no](argc, argv)); | 933 | xfunc_error_retval = applet_main[applet_no](argc, argv); |
934 | /* Note: applet_main() may also not return (die on a xfunc or such) */ | ||
935 | xfunc_die(); | ||
934 | } | 936 | } |
935 | # endif /* NUM_APPLETS > 0 */ | 937 | # endif /* NUM_APPLETS > 0 */ |
936 | 938 | ||
@@ -993,6 +995,14 @@ int main(int argc UNUSED_PARAM, char **argv) | |||
993 | */ | 995 | */ |
994 | mallopt(M_MMAP_THRESHOLD, 32 * 1024 - 256); | 996 | mallopt(M_MMAP_THRESHOLD, 32 * 1024 - 256); |
995 | #endif | 997 | #endif |
998 | #if 0 /*def M_TOP_PAD*/ | ||
999 | /* When the program break is increased, then M_TOP_PAD bytes are added | ||
1000 | * to the sbrk(2) request. When the heap is trimmed because of free(3), | ||
1001 | * this much free space is preserved at the top of the heap. | ||
1002 | * glibc default seems to be way too big: 128k, but need to verify. | ||
1003 | */ | ||
1004 | mallopt(M_TOP_PAD, 8 * 1024); | ||
1005 | #endif | ||
996 | 1006 | ||
997 | #if !BB_MMU | 1007 | #if !BB_MMU |
998 | /* NOMMU re-exec trick sets high-order bit in first byte of name */ | 1008 | /* NOMMU re-exec trick sets high-order bit in first byte of name */ |