gecko-dev/memory/jemalloc
Mike Hommey af38583e2e Bug 1121314 - Avoid needing the arena in chunk_alloc_default to avoid possible infinite loops involving a0malloc. r=njn
The infinite loop happens if chunk_alloc_arena needs to be called when a0malloc
is called. It in turn calls chunk_alloc_default, which uses tsd, which calls
a0malloc if it's the first time the tsd is being gotten from the current thread.
tsd only uses a0malloc on platforms where there is no native thread local storage
support, which, for Mozilla, essentially means anything that is not Linux.

But the tsd is only neededto get the dss precedence setting of the given arena.
That setting has no effect when dss is disabled, which it is on Windows and Mac.

Moreover, the default setting for dss precedence is "secondary", which means
jemalloc only tries dss after it failed to get memory with mmap/VirtualAlloc.
Considering the cases where mmap/VirtualAlloc would fail essentially means
there is shortage of address space, sbrk() is not going to have much more
success, so we might as well disable dss support on all platforms, avoiding
the infinite loop problem on Android and B2G as well.
2015-01-14 15:18:49 +09:00
..
src Bug 1121314 - Avoid needing the arena in chunk_alloc_default to avoid possible infinite loops involving a0malloc. r=njn 2015-01-14 15:18:49 +09:00
0001-Dont-overwrite-VERSION-on-a-git-repository.patch Bug 1094275 - Update the in-tree copy of jemalloc3 to commit b4acf73. r=glandium 2014-12-17 09:14:48 +09:00
0002-Move-variable-declaration-to-the-top-its-block-for-M.patch Bug 1112566 - Move variable declaration to the top its block for MSVC compatibility. r=jasone,r=glandium 2014-12-23 15:27:18 +09:00
0003-Add-a-isblank-definition-for-MSVC-2013.patch Bug 1112566 - Add a isblank definition for MSVC < 2013. r=glandium 2014-12-23 15:27:19 +09:00
0004-Implement-stats.bookkeeping.patch Bug 899126 - Part 1.5 - Implement bookkeeping for jemalloc3. r=glandium 2014-12-29 13:37:24 -08:00
0005-Bug-1121314-Avoid-needing-the-arena-in-chunk_alloc_d.patch Bug 1121314 - Avoid needing the arena in chunk_alloc_default to avoid possible infinite loops involving a0malloc. r=njn 2015-01-14 15:18:49 +09:00
Makefile.in Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps 2014-10-30 13:06:12 +09:00
moz.build Bug 1094275 - Update the in-tree copy of jemalloc3 to commit b4acf73. r=glandium 2014-12-17 09:14:48 +09:00
README.mozilla
update.sh Bug 1121314 - Avoid needing the arena in chunk_alloc_default to avoid possible infinite loops involving a0malloc. r=njn 2015-01-14 15:18:49 +09:00
upstream.info Bug 1094275 - Update the in-tree copy of jemalloc3 to commit b4acf73. r=glandium 2014-12-17 09:14:48 +09:00

This is a copy of the jemalloc source code. It is intended to be left pristine.
Modifications to this code without coordinating with upstream are unacceptable,
and will be reverted. Integration modifications should be made in memory/build
whenever possible.

The canonical repository for this source code is git://canonware.com/jemalloc.git.
The information about the upstream repository and revision lives in upstream.info.
In order to update the code, you can run the update.sh script located in
the same directory.