2 This is a version (aka dlmalloc) of malloc/free/realloc written by
3 Doug Lea and released to the public domain. Use, modify, and
4 redistribute this code without permission or acknowledgement in any
5 way you wish. Send questions, comments, complaints, performance
6 data, etc to dl@cs.oswego.edu
8 VERSION 2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
10 Note: There may be an updated version of this malloc obtainable at
11 ftp://gee.cs.oswego.edu/pub/misc/malloc.c
12 Check before installing!
14 Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
20 /* ------------------------------ mallopt ------------------------------ */
21 int mallopt(int param_number, int value)
29 av = get_malloc_state();
30 /* Ensure initialization/consolidation */
31 __malloc_consolidate(av);
33 switch(param_number) {
35 if (value >= 0 && value <= MAX_FAST_SIZE) {
36 set_max_fast(av, value);
41 case M_TRIM_THRESHOLD:
42 av->trim_threshold = value;
51 case M_MMAP_THRESHOLD:
52 av->mmap_threshold = value;
57 av->n_mmaps_max = value;