Jason Evans 20f1fc95ad Fix fork(2)-related deadlocks.
Add a library constructor for jemalloc that initializes the allocator.
This fixes a race that could occur if threads were created by the main
thread prior to any memory allocation, followed by fork(2), and then
memory allocation in the child process.

Fix the prefork/postfork functions to acquire/release the ctl, prof, and
rtree mutexes.  This fixes various fork() child process deadlocks, but
one possible deadlock remains (intentionally) unaddressed: prof
backtracing can acquire runtime library mutexes, so deadlock is still
possible if heap profiling is enabled during fork().  This deadlock is
known to be a real issue in at least the case of libgcc-based
backtracing.

Reported by tfengjun.
2012-10-09 15:21:46 -07:00
2012-04-30 17:13:45 -07:00
2012-10-09 15:21:46 -07:00
2012-10-09 15:21:46 -07:00
2012-04-30 16:50:55 -07:00
2012-03-12 15:57:24 -07:00
2012-03-04 10:46:12 -08:00
2012-05-09 16:12:00 -07:00
2012-04-23 12:49:23 -07:00

jemalloc is a general-purpose scalable concurrent malloc(3) implementation.
This distribution is a "portable" implementation that currently targets
FreeBSD, Linux, Apple OS X, and MinGW.  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.

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

URL: http://www.canonware.com/jemalloc/
Description
No description provided
Readme 13 MiB
Languages
C 87.4%
Perl 6.1%
M4 3.6%
Shell 1%
Makefile 0.9%
Other 1%