Go to file
Mike Hommey 12ab4383e9 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:13:28 -08:00
bin jemalloc cpp new/delete bindings 2016-12-12 18:36:06 -08:00
build-aux Update config.{guess,sub} from upstream. 2016-11-10 15:02:05 -08:00
doc Implement arena.<i>.destroy . 2017-01-06 18:58:46 -08:00
include Don't rely on OSX SDK malloc/malloc.h for malloc_zone struct definitions 2017-01-17 20:13:28 -08:00
m4 jemalloc cpp new/delete bindings 2016-12-12 18:36:06 -08:00
msvc Fixes to Visual Studio Project files 2016-11-04 09:59:05 -07:00
src Add dummy implementations for most remaining OSX zone allocator functions 2017-01-17 20:13:28 -08:00
test Fix prof_realloc() regression. 2017-01-17 15:16:37 -08:00
.appveyor.yml Add an AppVeyor config 2016-06-09 21:06:22 +09: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 jemalloc cpp new/delete bindings 2016-12-12 18:36:06 -08:00
.travis.yml Re-expand the Travis-CI build matrix. 2016-12-13 16:19:20 -08: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 18:35:23 -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:13:28 -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 huge page configuration and pages_[no}huge(). 2016-12-26 17:59:34 -08:00
jemalloc.pc.in Update project URL. 2016-09-12 11:56:24 -07:00
Makefile.in Fix prof_realloc() regression. 2017-01-17 15:16:37 -08:00
README Update project URL. 2016-09-12 11:56:24 -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 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/