Date: Wed, 28 Mar 2007 19:55:07 +0000 (UTC) From: Jason Evans <jasone@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdlib malloc.c Message-ID: <200703281955.l2SJt7Ua086062@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jasone 2007-03-28 19:55:07 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Remove the run promotion/demotion machinery. Replace it with red-black trees that track all non-full runs for each bin. Use the red-black trees to be able to guarantee that each new allocation is placed in the lowest address available in any non-full run. This change completes the transition to allocating from low addresses in order to reduce the retention of sparsely used chunks. If the run in current use by a bin becomes empty, deallocate the run rather than retaining it for later use. The previous behavior had the tendency to spread empty runs across multiple chunks, thus preventing the release of chunks that were completely unused. Generalize base_chunk_alloc() (and rename it to base_pages_alloc()) to handle allocation sizes larger than the chunk size, so that it is possible to support chunk sizes that are smaller than an arena object. Reduce the minimum chunk size from 64kB to 8kB. Optimize tracking of addresses for deleted chunks. Fix a statistics bug for huge allocations. Revision Changes Path 1.145 +221 -432 src/lib/libc/stdlib/malloc.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703281955.l2SJt7Ua086062>