server-skynet-source-3rd-je.../jemalloc
Jason Evans 940a2e02b2 Fix numerous arena bugs.
In arena_ralloc_large_grow(), update the map element for the end of the
newly grown run, rather than the interior map element that was the
beginning of the appended run.  This is a long-standing bug, and it had
the potential to cause massive corruption, but triggering it required
roughly the following sequence of events:
  1) Large in-place growing realloc(), with left-over space in the run
     that followed the large object.
  2) Allocation of the remainder run left over from (1).
  3) Deallocation of the remainder run *before* deallocation of the
     large run, with unfortunate interior map state left over from
     previous run allocation/deallocation activity, such that one or
     more pages of allocated memory would be treated as part of the
     remainder run during run coalescing.
In summary, this was a bad bug, but it was difficult to trigger.

In arena_bin_malloc_hard(), if another thread wins the race to allocate
a bin run, dispose of the spare run via arena_bin_lower_run() rather
than arena_run_dalloc(), since the run has already been prepared for use
as a bin run.  This bug has existed since March 14, 2010:
    e00572b384
    mmap()/munmap() without arena->lock or bin->lock.

Fix bugs in arena_dalloc_bin_run(), arena_trim_head(),
arena_trim_tail(), and arena_ralloc_large_grow() that could cause the
CHUNK_MAP_UNZEROED map bit to become corrupted.  These are all
long-standing bugs, but the chances of them actually causing problems
was much lower before the CHUNK_MAP_ZEROED --> CHUNK_MAP_UNZEROED
conversion.

Fix a large run statistics regression in arena_ralloc_large_grow() that
was introduced on September 17, 2010:
    8e3c3c61b5
    Add {,r,s,d}allocm().

Add debug code to validate that supposedly pre-zeroed memory really is.
2010-10-17 17:52:14 -07:00
..
bin Update pprof from google-perftools 1.6. 2010-10-02 11:31:36 -07:00
doc Increase default backtrace depth from 4 to 128. 2010-10-02 22:38:14 -07:00
include/jemalloc Fix numerous arena bugs. 2010-10-17 17:52:14 -07:00
src Fix numerous arena bugs. 2010-10-17 17:52:14 -07:00
test Fix tests build when --with-install-suffix is set. 2010-10-07 09:53:26 -07:00
autogen.sh Implement configuration system. 2009-06-23 19:01:18 -07:00
config.guess Implement configuration system. 2009-06-23 19:01:18 -07:00
config.stamp.in Fix build system problems. 2010-04-07 23:37:35 -07:00
config.sub Implement configuration system. 2009-06-23 19:01:18 -07:00
configure.ac Re-organize prof-libgcc configuration. 2010-10-07 11:59:12 -07:00
COPYING Port to Mac OS X. 2010-09-11 18:20:16 -07:00
INSTALL Fix compiler warnings. 2010-09-20 19:20:48 -07:00
install-sh Implement configuration system. 2009-06-23 19:01:18 -07:00
Makefile.in Fix tests build when --with-install-suffix is set. 2010-10-07 09:53:26 -07:00
README Update documentation. 2010-04-11 19:02:43 -07:00

jemalloc is a general-purpose scalable concurrent malloc(3) implementation.
This distribution is a stand-alone "portable" implementation that currently
targets only Linux.  jemalloc is included as the default allocator in the
FreeBSD and NetBSD operating systems, and it is used by the Mozilla Firefox web
browser on Microsoft Windows-related platforms.  Depending on your needs, one
of the other divergent versions may suit your needs better than this
distribution.

The COPYING file contains copyright and licensing information.

The INSTALL file contains information on how to configure, build, and install
jemalloc.

URL: http://www.canonware.com/jemalloc/