freebsd-dev/lib
Alan Cox b8947edcb6 Make malloc(3) superpage aware. Specifically, if getpagesizes(3) returns
a large page size that is greater than malloc(3)'s default chunk size but
less than or equal to 4 MB, then increase the chunk size to match the large
page size.

Most often, using a chunk size that is less than the large page size is not
a problem.  However, consider a long-running application that allocates and
frees significant amounts of memory.  In particular, it frees enough memory
at times that some of that memory is munmap()ed.  Up until the first
munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual
memory system.  Two adjacent 1MB chunks that are aligned on a 2MB boundary
will be promoted automatically to a superpage even though they were
allocated at different times.  The trouble begins with the munmap(),
releasing a 1MB chunk will trigger the demotion of the containing superpage,
leaving behind a half-used 2MB reservation.  Now comes the real problem.
Unfortunately, when the application needs to allocate more memory, and it
recycles the previously munmap()ed address range, the implementation of
mmap() won't be able to reuse the reservation.  Basically, the coalescing
rules in the virtual memory system don't allow this new range to combine
with its neighbor.  The effect being that superpage promotion will not
reoccur for this range of addresses until both 1MB chunks are freed at some
point in the future.

Reviewed by:	jasone
MFC after:	3 weeks
2009-09-26 18:20:40 +00:00
..
bind Add support for the build options that are currently in the port: 2009-06-01 21:58:59 +00:00
csu
libalias Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libarchive Fiz /usr/bin/unzip: A bug deep in libarchive's read-ahead logic 2009-09-08 05:02:41 +00:00
libauditd
libautofs Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libbegemot Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libbluetooth Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libbsm Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libbsnmp Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libbz2 Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libc Make malloc(3) superpage aware. Specifically, if getpagesizes(3) returns 2009-09-26 18:20:40 +00:00
libc_r Use, in uncovered part, the END() macro in order to improve debugging. 2009-05-25 14:37:10 +00:00
libcalendar
libcam Separate the parallel scsi knowledge out of the core of the XPT, and 2009-07-10 08:18:08 +00:00
libcom_err
libcompat K&R -> ANSI 2009-06-23 23:20:09 +00:00
libcrypt Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libdevinfo Use explicit int values for the device states in order to allow, 2009-09-15 16:59:52 +00:00
libdevstat Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libdisk Disable a check on a disk size because it's too strict. This change is 2009-09-21 04:04:02 +00:00
libdwarf Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libedit Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libelf Don't need to set symbol, default value is OK. 2009-03-12 04:44:09 +00:00
libexpat Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libfetch Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libftpio Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libgeom Add links to libgeom(3) where appropriate. 2009-05-19 12:10:48 +00:00
libgpib Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libgssapi
libipsec Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libipx
libjail Fixed markup (mostly) errors. 2009-09-21 08:30:52 +00:00
libkiconv Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libkse Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libkvm cr_groups is no longer embedded in struct ucred and is instead stored 2009-09-08 19:37:59 +00:00
libmagic Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libmd
libmemstat Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libmilter
libmp Rename all symbols in libmp(3) to mp_*, just like Solaris. 2009-02-26 21:43:15 +00:00
libncp Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libnetgraph Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libngatm Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libopie Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libpam Prevents pam_lastlog from segfaulting on session close when tty is null. 2009-08-30 05:12:37 +00:00
libpcap Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libpmc Use a more appropriate choice of words. 2009-08-23 14:48:25 +00:00
libproc Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libradius Add simple embedded RADIUS server support to libradius, by extending existing 2009-09-11 11:42:56 +00:00
librpcsec_gss
librpcsvc Use ANSI function declarations in librpcsvc. 2009-02-26 20:32:11 +00:00
librt
libsbuf
libsdp Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libsm
libsmb Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libsmdb
libsmutil
libstand ANSIfy, whitespace and comment adjustments, to simplify comparing these 2009-09-13 21:51:01 +00:00
libtacplus Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libtelnet Rename all symbols in libmp(3) to mp_*, just like Solaris. 2009-02-26 21:43:15 +00:00
libthr don't report error if key was deleted. 2009-09-25 00:15:30 +00:00
libthread_db Revert r181651, which changed the ABI, and use a temp variable instead. 2009-06-09 12:32:10 +00:00
libufs Allow libufs(3) functions to operate on a regular file. This makes it possible to 2009-06-11 18:04:57 +00:00
libugidfw Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libusb LibUSB v1.0: 2009-07-30 00:11:41 +00:00
libusbhid Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libutil Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libvgl Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libwrap Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
liby
libypclnt Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
libz
msun Use the documented machine constraint for SSE registers. 2009-06-11 13:59:51 +00:00
ncurses Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00
Makefile - Teach vesa(4) and dpms(4) about x86emu. [1] 2009-09-09 09:50:31 +00:00
Makefile.inc Bump the version of all non-symbol-versioned shared libraries in 2009-07-19 17:25:24 +00:00