aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c12
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 */