Go to file
Mike Hommey c6943acb3c Add dummy implementations for most remaining OSX zone allocator functions
Some system libraries are using malloc_default_zone() and then using
some of the malloc_zone_* API. Under normal conditions, those functions
check the malloc_zone_t/malloc_introspection_t struct for the values
that are allowed to be NULL, so that a NULL deref doesn't happen.

As of OSX 10.12, malloc_default_zone() doesn't return the actual default
zone anymore, but returns a fake, wrapper zone. The wrapper zone defines
all the possible functions in the malloc_zone_t/malloc_introspection_t
struct (almost), and calls the function from the registered default zone
(jemalloc in our case) on its own. Without checking whether the pointers
are NULL.

This means that a system library that calls e.g.
malloc_zone_batch_malloc(malloc_default_zone(), ...) ends up trying to
call jemalloc_zone.batch_malloc, which is NULL, and crash follows.

So as of OSX 10.12, the default zone is required to have all the
functions available (really, the same as the wrapper zone), even if they
do nothing.

This is arguably a bug in libsystem_malloc in OSX 10.12, but jemalloc
still needs to work in that case.
2017-01-17 20:12:24 -08:00
bin Pass retain and exclude parameters to /pprof/symbol. 2016-01-29 19:59:06 -08:00
build-aux Update config.{guess,sub} from upstream. 2016-11-10 15:08:32 -08:00
doc Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *). 2016-11-15 15:00:28 -08:00
include Don't rely on OSX SDK malloc/malloc.h for malloc_zone struct definitions 2017-01-17 20:12:24 -08:00
msvc Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *). 2016-11-15 15:00:28 -08:00
src Add dummy implementations for most remaining OSX zone allocator functions 2017-01-17 20:12:24 -08:00
test Mark partially purged arena chunks as non-hugepage. 2016-11-24 00:15:55 -08:00
.appveyor.yml Add an AppVeyor config 2016-09-26 15:47:41 -07:00
.autom4te.cfg Disable autom4te cache. 2014-09-02 17:49:29 -07:00
.gitattributes fix git handling of newlines on windows 2014-05-07 18:48:39 -04:00
.gitignore Add MS Visual Studio 2015 support 2016-02-20 10:55:23 -08:00
.travis.yml Add Travis-CI configuration 2016-09-26 15:47:29 -07:00
autogen.sh Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
ChangeLog Update ChangeLog for 4.4.0. 2016-12-03 22:44:24 -08:00
config.stamp.in Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
configure.ac Don't rely on OSX SDK malloc/malloc.h for malloc_zone struct definitions 2017-01-17 20:12:24 -08:00
COPYING Update copyright dates for 2016. 2016-02-28 15:20:40 -08:00
coverage.sh Add test code coverage analysis. 2013-12-06 18:50:51 -08:00
INSTALL Add --disable-syscall. 2016-12-03 16:56:19 -08:00
jemalloc.pc.in Update project URL. 2016-11-02 21:42:16 -07:00
Makefile.in Mark partially purged arena chunks as non-hugepage. 2016-11-24 00:15:55 -08:00
README Update project URL. 2016-11-02 21:42:16 -07:00

jemalloc is a general purpose malloc(3) implementation that emphasizes
fragmentation avoidance and scalable concurrency support.  jemalloc first came
into use as the FreeBSD libc allocator in 2005, and since then it has found its
way into numerous applications that rely on its predictable behavior.  In 2010
jemalloc development efforts broadened to include developer support features
such as heap profiling, Valgrind integration, and extensive monitoring/tuning
hooks.  Modern jemalloc releases continue to be integrated back into FreeBSD,
and therefore versatility remains critical.  Ongoing development efforts trend
toward making jemalloc among the best allocators for a broad range of demanding
applications, and eliminating/mitigating weaknesses that have practical
repercussions for real world applications.

The COPYING file contains copyright and licensing information.

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

The ChangeLog file contains a brief summary of changes for each release.

URL: http://jemalloc.net/