server-skynet-source-3rd-je.../include/jemalloc/internal
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
..
arena.h Fix large calloc() zeroing bugs. 2012-05-10 21:49:43 -07:00
atomic.h Add support for MSVC 2012-05-01 11:32:11 -07:00
base.h Fix fork-related bugs. 2012-03-13 16:31:41 -07:00
bitmap.h Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
chunk_dss.h Disable munmap() if it causes VM map holes. 2012-04-12 20:20:58 -07:00
chunk_mmap.h Fix mlockall()/madvise() interaction. 2012-10-08 18:04:49 -07:00
chunk.h Fix fork(2)-related deadlocks. 2012-10-09 15:21:46 -07:00
ckh.h Rename prn to prng. 2012-03-02 15:59:45 -08:00
ctl.h Fix fork(2)-related deadlocks. 2012-10-09 15:21:46 -07:00
extent.h Fix mlockall()/madvise() interaction. 2012-10-08 18:04:49 -07:00
hash.h Implement malloc_vsnprintf(). 2012-03-07 16:19:19 -08:00
huge.h Fix fork-related bugs. 2012-03-13 16:31:41 -07:00
jemalloc_internal.h.in Define LG_QUANTUM for hppa. 2012-10-08 15:41:06 -07:00
mb.h Simplify small size class infrastructure. 2012-02-28 16:50:47 -08:00
mutex.h Add support for Mingw 2012-04-21 21:27:46 -07:00
private_namespace.h Fix fork(2)-related deadlocks. 2012-10-09 15:21:46 -07:00
prng.h Rename prn to prng. 2012-03-02 15:59:45 -08:00
prof.h Fix fork(2)-related deadlocks. 2012-10-09 15:21:46 -07:00
ql.h Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
qr.h Move repo contents in jemalloc/ to top level. 2011-03-31 20:36:17 -07:00
quarantine.h Implement Valgrind support, redzones, and quarantine. 2012-04-11 11:46:18 -07:00
rb.h Clean up rb documentation. 2011-11-01 20:48:31 -07:00
rtree.h Fix fork(2)-related deadlocks. 2012-10-09 15:21:46 -07:00
size_classes.sh Use echo instead of cat in loops in size_classes.sh 2012-04-16 22:45:09 -07:00
stats.h Implement malloc_vsnprintf(). 2012-03-07 16:19:19 -08:00
tcache.h Optimize malloc() and free() fast paths. 2012-05-02 00:30:36 -07:00
tsd.h Add support for Mingw 2012-04-21 21:27:46 -07:00
util.h Make malloc_write() non-inline. 2012-05-02 02:08:03 -07:00