Go to file
Dave Watson 8309388408 Support static linking of jemalloc with glibc
glibc defines its malloc implementation with several weak and strong
symbols:

strong_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)
strong_alias (__libc_free, __cfree) weak_alias (__libc_free, cfree)
strong_alias (__libc_free, __free) strong_alias (__libc_free, free)
strong_alias (__libc_malloc, __malloc) strong_alias (__libc_malloc, malloc)

The issue is not with the weak symbols, but that other parts of glibc
depend on __libc_malloc explicitly.  Defining them in terms of jemalloc
API's allows the linker to drop glibc's malloc.o completely from the link,
and static linking no longer results in symbol collisions.

Another wrinkle: jemalloc during initialization calls sysconf to
get the number of CPU's.  GLIBC allocates for the first time before
setting up isspace (and other related) tables, which are used by
sysconf.  Instead, use the pthread API to get the number of
CPUs with GLIBC, which seems to work.

This resolves #442.
2016-10-28 15:08:19 -07:00
bin Pass retain and exclude parameters to /pprof/symbol. 2016-01-29 19:59:06 -08:00
build-aux Use AC_CONFIG_AUX_DIR([build-aux]). 2015-11-12 11:23:39 -08:00
doc Remove all vestiges of chunks. 2016-10-12 11:55:43 -07:00
include Support static linking of jemalloc with glibc 2016-10-28 15:08:19 -07:00
msvc Uniformly cast mallctl[bymib]() oldp/newp arguments to (void *). 2016-10-27 21:31:25 -07:00
src Support static linking of jemalloc with glibc 2016-10-28 15:08:19 -07:00
test Reduce memory requirements for regression tests. 2016-10-28 11:23:24 -07: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 Add MS Visual Studio 2015 support 2016-02-20 10:55:23 -08:00
.travis.yml Add Travis-CI configuration 2016-07-07 13:16:05 -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.2.1. 2016-06-08 10:19:33 -07:00
config.stamp.in Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
configure.ac Only link with libm (-lm) if necessary. 2016-10-27 21:23:48 -07: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 Remove all vestiges of chunks. 2016-10-12 11:55:43 -07:00
jemalloc.pc.in Update project URL. 2016-09-12 11:56:24 -07:00
Makefile.in Only link with libm (-lm) if necessary. 2016-10-27 21:23:48 -07: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/