From e8a0788b249cbac5bf5b2aa2d81bb8f6b29a7a4b Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 10 Jun 2007 15:08:44 +0000 Subject: moved biggest stack buffers to malloc space, or made their size configurable (8k of shell line edit buffer is an overkill) # make ARCH=i386 bloatcheck function old new delta read_line_input 3933 3967 +34 ifaddrlist 348 345 -3 do_loadfont 208 191 -17 edit_file 840 819 -21 .rodata 129112 129080 -32 uncompress 1305 1268 -37 loadfont_main 566 495 -71 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 34/-181) Total: -147 bytes --- libbb/Config.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbb/Config.in') diff --git a/libbb/Config.in b/libbb/Config.in index 112a3d658..a1ff7c056 100644 --- a/libbb/Config.in +++ b/libbb/Config.in @@ -30,7 +30,17 @@ config FEATURE_EDITING bool "Command line editing" default n help - Enable command editing (mainly for shell). + Enable line editing (mainly for shell command line). + +config FEATURE_EDITING_MAX_LEN + int "Maximum length of input" + range 128 8192 + default 1024 + depends on FEATURE_EDITING + help + Line editing code uses on-stack buffers for storage. + You may want to decrease this parameter if your target machine + benefits from smaller stack usage. config FEATURE_EDITING_FANCY_KEYS bool "Additional editing keys" -- cgit v1.2.3