<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/lib/libc/stdlib/malloc.c, branch release/7.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2009-05-01T02:51:58Z</updated>
<entry>
<title>Copy releng/7.2 to release/7.2.0 for FreeBSD 7.2-RELEASE.</title>
<updated>2009-05-01T02:51:58Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2009-05-01T02:51:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b205d83df7763ca1f099bce5ac12a05862a626c4'/>
<id>urn:sha1:b205d83df7763ca1f099bce5ac12a05862a626c4</id>
<content type='text'>
Approved by:	re (implicit)

This commit was manufactured to restore the state of the 7.2-RELEASE image.
</content>
</entry>
<entry>
<title>Mostly synchronize  lib/libthr and sys/kern/kern_umtx.c with the code</title>
<updated>2009-03-24T20:57:10Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2009-03-24T20:57:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5da9fe5b5d84c14339b36ecf7f6f52b5b95076cd'/>
<id>urn:sha1:5da9fe5b5d84c14339b36ecf7f6f52b5b95076cd</id>
<content type='text'>
from HEAD.

Since libkse is still built on RELENG_7, pthread_cleanup_push/pop
are left as the functions, but the support code in libthr is present for
the macro versions.

Malloc in RELENG_7 does not require thread exit hook, but I decided
to add empty handler for it, instead of removing callback from thr_exit().

No mergeinfo since this change is prepared by patching libthr and then
bringing in required missed bits.

Requested by:	bms
Reviewed by:	davidxu
Tested by:	bms, Mykola Dzham &lt;i levsha org ua&gt;
Approved by:	re (kensmith)
</content>
</entry>
<entry>
<title>MFC:</title>
<updated>2008-11-10T17:30:49Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2008-11-10T17:30:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d05be0bb64586f5742b8efeaf997ac51b1db87e1'/>
<id>urn:sha1:d05be0bb64586f5742b8efeaf997ac51b1db87e1</id>
<content type='text'>
	Revert to preferring mmap(2) over sbrk(2) when mapping memory, due
	to potential extreme contention in the kernel for multi-threaded
	applications on SMP systems.

Approved by:	re (kib)
</content>
</entry>
<entry>
<title>MFC allocator improvements and fixes:</title>
<updated>2008-08-16T20:14:21Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2008-08-16T20:14:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b6a33e87c0af0760226537fabb64cf9ec5780bb8'/>
<id>urn:sha1:b6a33e87c0af0760226537fabb64cf9ec5780bb8</id>
<content type='text'>
* Enhance the chunk map to support run coalescing, and substantially reduce
  the number of red-black tree operations performed.

* Remove unused code.

* Fix arena_run_reg_dalloc() to use the entire precomputed division table.

* Improve lock preemption performance for hyperthreaded CPUs.
</content>
</entry>
<entry>
<title>MFC allocator improvements and fixes:</title>
<updated>2008-06-16T23:42:05Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2008-06-16T23:42:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=bb6ada98aa046025d697f7fb7adc4b4e10df1b58'/>
<id>urn:sha1:bb6ada98aa046025d697f7fb7adc4b4e10df1b58</id>
<content type='text'>
* Implement more compact red-black trees, thus reducing memory usage
  by ~0.5-1%.

* Add a separate tree to track dirty-page-containing chunks, thus
  improving worst case allocation performance.

* Fix a deadlock in base_alloc() for the error (OOM) path.

* Catch integer overflow for huge allocations when using sbrk(2).

* Fix bit vector initialization for run headers.  This fix has no
  practical impact for correct programs.  Incorrect programs will
  potentially experience allocation failures rather than memory
  corruption, both of which are "undefined behavior".
</content>
</entry>
<entry>
<title>MFC: Merge malloc(3) improvements and fixes.  The highlights are:</title>
<updated>2008-03-07T22:39:39Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2008-03-07T22:39:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d25eaea3901102b810ad0b75e3f464935b2b95ca'/>
<id>urn:sha1:d25eaea3901102b810ad0b75e3f464935b2b95ca</id>
<content type='text'>
* Avoid re-zeroing memory in calloc() when possible.

* Use pthread mutexes where possible instead of libc "spinlocks", and
  actually spin some during contention before blocking.

* Implement dynamic load balancing of thread--&gt;arena mapping.

* Avoid floating point math in order to avoid increased context switch
  overhead for applications that otherwise would not use floating point
  math.

* Restructure how sbrk() and mmap() are used to acquire memory mappings.
  This provides a way to force malloc to only use sbrk(), which can be
  useful in the context of resource limits.

* Reduce the number of mmap() calls typically necessary when allocating
  a chunk.

* Track dirty unused pages so that they can be purged if they exceed a
  threshold.

* Try to realloc() large objects in place.

* Manage page runs with trees instead of chunk maps, which allows
  logarithmic-time run allocation.
</content>
</entry>
<entry>
<title>Turn on MALLOC_PRODUCTION which turns off some stuff used for debugging</title>
<updated>2007-10-11T06:35:46Z</updated>
<author>
<name>Ken Smith</name>
<email>kensmith@FreeBSD.org</email>
</author>
<published>2007-10-11T06:35:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=419d5e2694db7763cd4601f6548e151209cecb14'/>
<id>urn:sha1:419d5e2694db7763cd4601f6548e151209cecb14</id>
<content type='text'>
support.

Reminded by:	kris
Approved by:	re (implicit)
</content>
</entry>
<entry>
<title>Fix junk/zero filling for realloc().  Junk filling was missing in one case,</title>
<updated>2007-06-15T22:00:16Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2007-06-15T22:00:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=76507741ab06b468ea2597570691523613602e15'/>
<id>urn:sha1:76507741ab06b468ea2597570691523613602e15</id>
<content type='text'>
and zero filling was broken in a way that could cause memory corruption.

Update comments.
</content>
</entry>
<entry>
<title>Use size_t instead of unsigned for pagesize-related values, in order to</title>
<updated>2007-03-29T21:07:17Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2007-03-29T21:07:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d33f4690bac522d8b827990a5823d265452cfaac'/>
<id>urn:sha1:d33f4690bac522d8b827990a5823d265452cfaac</id>
<content type='text'>
avoid downcasting issues.  In particular, this change fixes
posix_memalign(3) for alignments greater than 2^31 on LP64 systems.

Make sure that NDEBUG is always set to be compatible with MALLOC_DEBUG. [1]

Reported by:	[1] Lee Hyo geol &lt;hyogeollee@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove the run promotion/demotion machinery.  Replace it with red-black</title>
<updated>2007-03-28T19:55:07Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2007-03-28T19:55:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=eaf8d732126bc0a25d8dd5921b91f47357aa38fb'/>
<id>urn:sha1:eaf8d732126bc0a25d8dd5921b91f47357aa38fb</id>
<content type='text'>
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.
</content>
</entry>
</feed>
