summaryrefslogtreecommitdiff
path: root/extra/Configs/Config.in
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-12-30 10:40:49 +0000
committerEric Andersen <andersen@codepoet.org>2003-12-30 10:40:49 +0000
commit8d532c51318bad2436880ecac972c9dfa3996c9b (patch)
tree821863358734242feb99643e9d66ee9b175ad464 /extra/Configs/Config.in
parent4c9086ee4afde4257a4b4a8f55e05932d1b6acfd (diff)
Rework malloc. The new default implementation is based on dlmalloc from Doug
Lea. It is about 2x faster than the old malloc-930716, and behave itself much better -- it will properly release memory back to the system, and it uses a combination of brk() for small allocations and mmap() for larger allocations. -Erik
Diffstat (limited to 'extra/Configs/Config.in')
-rw-r--r--extra/Configs/Config.in28
1 files changed, 20 insertions, 8 deletions
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 151d60216..8f5eee439 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -287,24 +287,36 @@ config UCLIBC_HAS_LFS
choice
prompt "Malloc Implementation"
- default MALLOC_930716
+ default MALLOC if ! UCLIBC_HAS_MMU
+ default MALLOC_STANDARD if UCLIBC_HAS_MMU
help
"malloc" use mmap for all allocations and so works very well on MMU-less
systems that do not support the brk() system call. It is pretty smart
about reusing already allocated memory, and minimizing memory wastage.
+ This is the default for uClinux MMU-less systems.
- "malloc-930716" is derived from libc-5.3.12 and uses the brk() system call
- for all memory allocations. This makes it very fast. It is also pretty
- smart about reusing already allocated memory, and minimizing memory wastage.
- Because this uses brk() it will not work on uClinux MMU-less systems.
+ "malloc-simple" was written from scratch for uClibc, and is the
+ simplest possible (and therefore smallest) malloc implementation.
+ It is rather dumb, and certainly isn't the fastest. But it is 100%
+ standards compliant, thread safe, and very small.
- If unsure, answer "malloc".
+ "malloc-standard" is derived from the public domain dlmalloc
+ implementation by Doug Lea. It is quite fast, and is pretty smart
+ about reusing already allocated memory, and minimizing memory
+ wastage. This uses brk() for small allocations, while using mmap()
+ for larger allocations. This is the default malloc implementation
+ for uClibc.
+
+ If unsure, answer "malloc-standard".
config MALLOC
bool "malloc"
-config MALLOC_930716
- bool "malloc-930716"
+config MALLOC_SIMPLE
+ bool "malloc-simple"
+
+config MALLOC_STANDARD
+ bool "malloc-standard"
depends on UCLIBC_HAS_MMU
endchoice