gecko-dev/memory/build
Mike Hommey 078c8d1896 Bug 1399921 - Register zone allocator independently, and delay jemalloc initialization on mac. r=njn
In bug 1361258, we unified the initialization sequence on mac, and
chose to make the zone registration happen after jemalloc
initialization.

The order between jemalloc init and zone registration shouldn't actually
matter, because jemalloc initializes the first time the allocator is
actually used.

On the other hand, in some build setups (e.g. with light optimization),
the initialization of the thread_arena thread local variable can happen
after the forced jemalloc initialization because of the order the
corresponding static initializers run. In some levels of optimization,
the thread_arena initializer resets the value the jemalloc
initialization has set, which subsequently makes choose_arena() return
a bogus value (or hit an assertion in ThreadLocal.h on debug builds).

So instead of initializing jemalloc from a static initializer, which
then registers the zone, we instead register the zone and let jemalloc
initialize itself when used, which increases the chances of the
thread_arena initializer running first.

--HG--
extra : rebase_source : 4d9a5340d097ac8528dc4aaaf0c05bbef40b59bb
2017-09-15 07:34:48 +09:00
..
Makefile.in Bug 1398965 - Fold memory/mozjemalloc into memory/build. r=njn 2017-09-12 13:14:35 +09:00
malloc_decls.h Bug 1400063 - Automatically declare jemalloc_* functions in mozmemory.h. r=njn 2017-09-14 18:28:12 +09:00
moz.build Bug 1400096 - Build mozmemory_wrap as C++. r=njn 2017-09-15 10:19:37 +09:00
mozjemalloc.cpp Bug 1399921 - Register zone allocator independently, and delay jemalloc initialization on mac. r=njn 2017-09-15 07:34:48 +09:00
mozjemalloc.h Bug 1398965 - Fold memory/mozjemalloc into memory/build. r=njn 2017-09-12 13:14:35 +09:00
mozjemalloc_types.h Bug 1398965 - Fold memory/mozjemalloc into memory/build. r=njn 2017-09-12 13:14:35 +09:00
mozmemory.h Bug 1400063 - Automatically declare jemalloc_* functions in mozmemory.h. r=njn 2017-09-14 18:28:12 +09:00
mozmemory_wrap.cpp Bug 1400096 - Don't define the operator new/delete functions as mangled in mozmem_wrap.cpp. r=njn 2017-09-15 10:28:33 +09:00
mozmemory_wrap.h Bug 1399350 - Remove jemalloc_*_impl macros. r=njn 2017-09-13 14:25:21 +09:00
rb.h Bug 1398965 - Fold memory/mozjemalloc into memory/build. r=njn 2017-09-12 13:14:35 +09:00
replace_malloc.h Bug 1368932 - Handle missing replace_posix_memalign at the replace-malloc level. r=njn 2017-05-31 13:47:17 +09:00
replace_malloc_bridge.h Bug 1182996 - Fix and add missing namespace comments. rs=ehsan 2015-07-13 08:25:42 -07:00
zone.c Bug 1399921 - Register zone allocator independently, and delay jemalloc initialization on mac. r=njn 2017-09-15 07:34:48 +09:00