opnsense-src/lib/libc/stdlib
Jason Evans b97aec1d61 If no coalesced exact-fit small regions are available, but delayed exact-
fit regions are available, use the delayed regions in LIFO order, in order
to increase locality of reference.  We might expect this to cause delayed
regions to be removed from the delay ring buffer more often (since we're
now re-using more recently buffered regions), but numerous tests indicate
that the overall impact on memory usage tends to be good (reduced
fragmentation).

Re-work arena_frag_reg_alloc() so that when large free regions are
exhausted, it uses small regions in a way that favors contiguous allocation
of sequentially allocated small regions.  Use arena_frag_reg_alloc() in
this capacity, rather than directly attempting over-fitting of small
requests when no large regions are available.

Remove the bin overfit statistic, since it is no longer relevant due to
the arena_frag_reg_alloc() changes.

Do not specify arena_frag_reg_alloc() as an inline function.  It is too
large to benefit much from being inlined, and it is also called in two
places, only one of which is in the critical path (the other call bloated
arena_reg_alloc()).

Call arena_coalesce() for a region before caching it with
arena_mru_cache().

Add assertions that detect the attempted caching of adjacent free regions,
so that we notice this problem when it is first created, rather than in
arena_coalesce(), when it's too late to know how the problem arose.

Reported by:    Hans Blancke
2006-01-25 04:21:22 +00:00
..
_Exit.c
a64l.3 Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert 2005-12-24 22:37:59 +00:00
a64l.c Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert 2005-12-24 22:37:59 +00:00
abort.3
abort.c Move the declaration of __cleanup to libc_private.h as it is used in both 2005-09-12 13:46:32 +00:00
abs.3
abs.c
alloca.3 mdoc(7) fix: Use the normal AT&T macro (.At) rather than its 2003-06-28 22:12:30 +00:00
atexit.3
atexit.c Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendor 2003-12-19 17:11:20 +00:00
atexit.h Implement __cxa_atexit/__cxa_finalize as specified by the cross-vendor 2003-12-19 17:11:21 +00:00
atof.3
atof.c style cleanup: Remove duplicate $FreeBSD$ tags. 2004-02-10 20:42:33 +00:00
atoi.3
atoi.c
atol.3
atol.c
atoll.c
bsearch.3
bsearch.c
div.3
div.c
exit.3 Sort SEE ALSO references (in dictionary order, ignoring case). 2004-07-04 20:55:50 +00:00
exit.c Move the declaration of __cleanup to libc_private.h as it is used in both 2005-09-12 13:46:32 +00:00
getenv.3 Sort sections. 2005-01-20 09:17:07 +00:00
getenv.c
getopt.3 Use #include <unistd.h> rather than the explicit externs in the 2004-07-31 01:00:50 +00:00
getopt.c Merge some fixes from NetBSD's getopt.c v1.26: 2004-03-06 17:05:45 +00:00
getopt_long.3 Sort sections. 2005-01-20 09:17:07 +00:00
getopt_long.c Keep it sync with OpenBSD: 2004-07-06 13:58:45 +00:00
getsubopt.3 POSIX clearly states that getsubopt() should be declared in <stdlib.h> 2004-02-23 03:32:10 +00:00
getsubopt.c Remove unneccessary <unistd.h> 2004-02-23 03:30:02 +00:00
grantpt.3 Get rid of duplicates. 2003-09-14 13:41:59 +00:00
grantpt.c Fix ptsname(3) by converting it to use devname(3) to obtain the name of 2005-07-07 17:48:40 +00:00
hcreate.3 Sort sections. 2005-01-20 09:17:07 +00:00
hcreate.c
heapsort.c
imaxabs.3
imaxabs.c
imaxdiv.3
imaxdiv.c
insque.3 Fix typo. 2003-02-25 21:59:36 +00:00
insque.c
l64a.c Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert 2005-12-24 22:37:59 +00:00
labs.3
labs.c
ldiv.3
ldiv.c
llabs.3
llabs.c
lldiv.3
lldiv.c
lsearch.3 Sort sections. 2005-01-20 09:17:07 +00:00
lsearch.c
Makefile.inc In preparation for a new malloc implementation: 2006-01-12 07:28:21 +00:00
malloc.3 Replace malloc(), calloc(), posix_memalign(), realloc(), and free() with 2006-01-13 18:38:56 +00:00
malloc.c If no coalesced exact-fit small regions are available, but delayed exact- 2006-01-25 04:21:22 +00:00
memory.3
merge.c Fix some signed/unsigned comparisons. Fix prototypes while I'm here. 2005-01-12 03:39:34 +00:00
posix_memalign.3 In preparation for a new malloc implementation: 2006-01-12 07:28:21 +00:00
putenv.c
qsort.3 Sort sections. 2005-01-20 09:17:07 +00:00
qsort.c
qsort_r.c
radixsort.3 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
radixsort.c Improve the performance of radixsort() when 2003-11-11 04:59:23 +00:00
rand.3 sranddev() is not magic pixie dust. While it gives a good random 2004-11-10 17:25:49 +00:00
rand.c
random.3 Sort sections. 2005-01-20 09:17:07 +00:00
random.c Use 'uint32_t' instead of 'long' when a 32-bit integer is intended. 2004-01-20 03:02:18 +00:00
reallocf.c
realpath.3 Make realpath() thread-safe. New implementation does not use chdir(2) at all. 2003-03-27 20:48:53 +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
setenv.c
strfmon.3
strfmon.c Include a couple of headers to ensure consistency between the prototype and 2005-09-12 19:52:42 +00:00
strtod.3 Sort sections. 2005-01-20 09:17:07 +00:00
strtoimax.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtol.3 Especially mention that setting errno to EINVAL in "no conversion" case 2005-01-22 18:02:58 +00:00
strtol.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtoll.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtoq.c
strtoul.3 Especially mention that setting errno to EINVAL in "no conversion" case 2005-01-22 18:02:58 +00:00
strtoul.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtoull.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtoumax.c Whitespace/style tweaking of prev. commit. 2005-01-21 13:31:02 +00:00
strtouq.c
system.3
system.c
tdelete.c
tfind.c
tsearch.3 Sort sections. 2005-01-20 09:17:07 +00:00
tsearch.c
twalk.c