Introduce FEATURE_COPYBUF_KB.

People who want smaller stack at any cost may use it
to reduce cp's stack usage (FEATURE_COPYBUF_KB=1).
Desktop people may get faster copy of big files
(FEATURE_COPYBUF_KB=32 is ~30% faster than 4kb)
This commit is contained in:
Denis Vlasenko
2007-12-02 03:27:42 +00:00
parent e2532ab5f2
commit 4c13922961
2 changed files with 34 additions and 8 deletions

View File

@@ -110,6 +110,16 @@ config FEATURE_EDITING_FANCY_PROMPT
Setting this option allows for prompts to use things like \w and
\$ and escape codes.
config FEATURE_COPYBUF_KB
int "Copy buffer size, in kilobytes"
range 1 1024
default 4
help
Size of buffer used by cp, mv, install etc.
Buffers which are 4 kb or less will be allocated on stack.
Bigger buffers will be allocated with mmap, with fallback to 4 kb
stack buffer if mmap fails.
config MONOTONIC_SYSCALL
bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
default y