freebsd-skq/lib/libc
Jason Evans c9f0c8fd74 Avoid using vsnprintf(3) unless MALLOC_STATS is defined, in order to
avoid substantial potential bloat for static binaries that do not
otherwise use any printf(3)-family functions. [1]

Rearrange arena_run_t so that the region bitmask can be minimally sized
according to constraints related to each bin's size class.  Previously,
the region bitmask was the same size for all run headers, which wasted
a measurable amount of memory.

Rather than making runs for small objects as large as possible, make
runs as small as possible such that header overhead stays below a
certain bound.  There are two exceptions that override the header
overhead bound:

	1) If the bound is impossible to honor, it is relaxed on a
	   per-size-class basis.  Since there is one bit of header
	   overhead per object (plus a constant), it is impossible to
	   achieve a header overhead less than or equal to 1/(# of bits
	   per object).  For the current setting of maximum 0.5% header
	   overhead, this relaxation comes into play for {2, 4, 8,
	   16}-byte objects, for which header overhead is (on 64-bit
	   systems) {7.1, 4.3, 2.2, 1.2}%, respectively.

	2) There is still a cap on small run size, still set to 64kB.
	   This comes into play for {1024, 2048}-byte objects, for which
	   header overhead is {1.6, 3.1}%, respectively.

In practice, this reduces the run sizes, which makes worst case
low-water memory usage due to fragmentation less bad.  It also reduces
worst case high-water run fragmentation due to non-full runs, but this
is only a constant improvement (most important to small short-lived
processes).

Reduce the default chunk size from 2MB to 1MB.  Benchmarks indicate that
the external fragmentation reduction makes 1MB the new sweet spot (as
small as possible without adversely affecting performance).

Reported by:	[1] kientzle
2007-03-20 03:44:10 +00:00
..
amd64 Remove silly n that crept in 2007-01-09 00:38:24 +00:00
arm The distinction between quiet and signaling NaN formats is 2007-01-03 05:00:03 +00:00
compat-43 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
db Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
gdtoa Fix rounding of 0xf for hex fp formats. 2007-01-03 04:57:58 +00:00
gen Don't assert() the TLS allocation requested is big enough; just 2007-02-25 21:23:50 +00:00
gmon Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
i386 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ia64 The distinction between quiet and signaling NaN formats is 2007-01-03 05:00:03 +00:00
include Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
inet Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
isc Merge BIND9 9.3.3 into main chunk. 2006-12-15 20:59:55 +00:00
locale Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nameser Upgrade res_update(3) and the friends to BIND9's one excluding TSIG 2006-05-21 11:19:36 +00:00
net - Sysctl's move to seperate file 2007-03-15 11:27:14 +00:00
nls Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
posix1e Move _posix1e_acl_name_to_id out of acl_support.c and into 2007-02-26 02:07:02 +00:00
powerpc The distinction between quiet and signaling NaN formats is 2007-01-03 05:00:03 +00:00
quad Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
regex Test cases for back references. 2007-03-05 09:44:41 +00:00
resolv Only reject file descriptors higher than FD_SETSIZE if we are not using 2007-03-05 19:39:51 +00:00
rpc Disable RPC exponential back-off for FreeBSD.org systems (IE. hidden 2007-03-04 12:25:03 +00:00
softfloat Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
sparc64 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
stdio o Add ENVIRONMENT section and mention there that TMPDIR is ignored 2007-03-16 21:46:24 +00:00
stdlib Avoid using vsnprintf(3) unless MALLOC_STATS is defined, in order to 2007-03-20 03:44:10 +00:00
stdtime On FreeBSD/arm, any value > 50 bits will result in a rediculously huge 2007-01-19 01:16:35 +00:00
string Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sys Wordsmithery. 2007-03-09 19:43:42 +00:00
uuid In DCE 1.1, the time_low value is defined as an unsigned 32-bit 2006-08-03 03:34:36 +00:00
xdr Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
yp - Bump _yplib_timeout limit from 10 to 20 seconds to better handle 2007-03-04 10:30:43 +00:00
Makefile Disable RPC exponential back-off for FreeBSD.org systems (IE. hidden 2007-03-04 12:25:03 +00:00
Versions.def Add symbol maps and initial symbol version definitions to libc. 2006-03-13 00:53:21 +00:00