зеркало из https://github.com/mozilla/gecko-dev.git
fcd9a5550a
NO_TLS used to be hardcoded on mac because up to 10.6, __thread was not supported. Until recently, we still supported for 10.6, and it's not the case anymore, so we could make mac builds use __thread. Unfortunately, on OSX, __thread circles back calling malloc to allocate storage on first access, so we have an infinite loop problem here. Fortunately, pthread_keys don't have this property, so we can use that instead. It doesn't appear to have significantly more overhead (and TLS overhead is small anyways compared to the amount of work involved in allocating memory with mozjemalloc). At the same time, we uniformize the initialization sequence between mozjemalloc and mozjemalloc+replace-malloc, such that we have less occasions for surprises when riding the trains (replace-malloc being nightly only), ensuring the zone registration happens at the end of mozjemalloc's initialization. |
||
---|---|---|
.. | ||
build | ||
fallible | ||
gtest | ||
jemalloc | ||
mozalloc | ||
mozjemalloc | ||
replace | ||
volatile | ||
moz.build |