opnsense-src/lib/libc/stdlib
Jason Evans bb99793a2b Use extents rather than binary buddies to track free pages within
chunks.  This allows runs to be any multiple of the page size.  The
primary advantage is that large objects are no longer constrained to be
2^n pages, which can dramatically decrease internal fragmentation for
large objects.  This also allows the sizes for runs that back small
objects to be more finely tuned.

Free runs are searched for linearly using the chunk page map (with the
help of some heuristic optimizations).  This changes the allocation
policy from "first best fit" to "first fit".  A prototype red-black tree
implementation for tracking free runs that implemented "first best fit"
did not cause a measurable speed or memory usage difference for
realistic chunk sizes (though of course it is possible to construct
benchmarks that favor one allocation policy over another).

Refine the handling of fullness constraints for small runs to be more
tunable.

Restructure the per chunk page map to contain only two fields per entry,
rather than four.  Also, increase each entry from 4 to 8 bytes, since it
allows for 32-bit integers, without increasing the number of chunk
header pages.

Relax the maximum chunk size constraint.  This is of no practical
interest; it is merely fallout from the chunk page map restructuring.

Revamp statistics gathering and reporting to be faster, clearer and more
informative.  Statistics gathering is fast enough now to have little
to no impact on application speed, but it still requires approximately
two extra pages of memory per arena (per process).  This memory overhead
may be acceptable for most systems, but we still need to leave
statistics gathering disabled by default in RELENG branches.

Rename NO_MALLOC_EXTRAS to MALLOC_PRODUCTION in order to make its intent
clearer (i.e. it should be defined in RELENG branches).
2007-03-23 05:05:48 +00:00
..
_Exit.c Implement C99's _Exit() interface. 2002-09-10 02:04:49 +00:00
a64l.3 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
a64l.c Correct decoding a string containing '/'. 2006-05-19 19:06:38 +00:00
abort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abs.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abs.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
alloca.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atexit.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atexit.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atexit.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atof.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atof.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atoi.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atoi.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atol.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atol.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atoll.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
bsearch.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
bsearch.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
div.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
div.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
exit.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
exit.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getenv.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getenv.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getopt.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getopt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getopt_long.3 Sort sections. 2005-01-20 09:17:07 +00:00
getopt_long.c Keep compatible parts in sync with OpenBSD v1.21, add some comments. 2006-09-23 14:48:31 +00:00
getsubopt.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getsubopt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
grantpt.3 Get rid of duplicates. 2003-09-14 13:41:59 +00:00
grantpt.c Remove extra slash from pty slave device name returned by ptsname. 2006-02-13 00:04:04 +00:00
hcreate.3 Sort sections. 2005-01-20 09:17:07 +00:00
hcreate.c Remove improper use of <namespace.h> 2002-06-27 13:18:27 +00:00
heapsort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
imaxabs.3 mdoc(7) police: fixed typos and minor markup nits. 2001-11-21 16:19:50 +00:00
imaxabs.c o Implement imaxabs(), imaxdiv(), llabs(), lldiv(). 2001-11-15 02:05:03 +00:00
imaxdiv.3 mdoc(7) police: fixed typos and minor markup nits. 2001-11-21 16:19:50 +00:00
imaxdiv.c o Implement imaxabs(), imaxdiv(), llabs(), lldiv(). 2001-11-15 02:05:03 +00:00
insque.3 Fix typo. 2003-02-25 21:59:36 +00:00
insque.c style(9): return type on separate line from function name. 2003-01-04 07:34:41 +00:00
l64a.c Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert 2005-12-24 22:37:59 +00:00
labs.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
labs.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ldiv.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ldiv.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
llabs.3 mdoc(7) police: fixed typos and minor markup nits. 2001-11-21 16:19:50 +00:00
llabs.c o Implement imaxabs(), imaxdiv(), llabs(), lldiv(). 2001-11-15 02:05:03 +00:00
lldiv.3 mdoc(7) police: fixed typos and minor markup nits. 2001-11-21 16:19:50 +00:00
lldiv.c o Implement imaxabs(), imaxdiv(), llabs(), lldiv(). 2001-11-15 02:05:03 +00:00
lsearch.3 Sort sections. 2005-01-20 09:17:07 +00:00
lsearch.c - Remove the lsearch() and lfind() functions and their manpage from 2002-10-16 14:29:23 +00:00
Makefile.inc Add malloc_usable_size(3). 2006-03-28 22:16:04 +00:00
malloc.3 Markup fixes. 2006-09-17 21:27:35 +00:00
malloc.c Use extents rather than binary buddies to track free pages within 2007-03-23 05:05:48 +00:00
memory.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
merge.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
posix_memalign.3 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
putenv.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
qsort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
qsort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
qsort_r.c Implement C99's _Exit() interface. 2002-09-10 02:04:49 +00:00
radixsort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
radixsort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rand.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rand.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
random.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
random.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
reallocf.c Fix the style of the SCM ID's. 2002-03-22 21:53:29 +00:00
realpath.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
realpath.c Fix stripping last path component when only one path component left. 2003-05-28 08:23:01 +00:00
remque.c style(9): return type on separate line from function name. 2003-01-04 07:34:41 +00:00
setenv.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strfmon.3 strfmon(3) does not correctly handle multibyte characters in the 2003-01-06 06:21:25 +00:00
strfmon.c Include a couple of headers to ensure consistency between the prototype and 2005-09-12 19:52:42 +00:00
strtod.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoimax.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtol.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtol.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoll.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtonum.3 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
strtonum.c POSIXed strtoll() (and ours one too) can set errno to EINVAL, so check 2006-03-14 19:53:03 +00:00
strtoq.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoul.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoul.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoull.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoumax.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtouq.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
Symbol.map Add malloc_usable_size(3). 2006-03-28 22:16:04 +00:00
system.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
system.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tdelete.c No need to include <assert.h> here. 2003-01-05 02:43:18 +00:00
tfind.c No need to include <assert.h> here. 2003-01-05 02:43:18 +00:00
tsearch.3 twalk() expects an `action' function not a comparison function. 2006-06-23 13:36:33 +00:00
tsearch.c No need to include <assert.h> here. 2003-01-05 02:43:18 +00:00
twalk.c No need to include <assert.h> here. 2003-01-05 02:43:18 +00:00