зеркало из https://github.com/mozilla/gecko-dev.git
94ec493862
`jemalloc_replace_dynamic()` is badly broken. If you install a malloc table other than the default at startup (e.g. DMD's or PHC's), when you call `jemalloc_replace_dynamic()` it installs a new allocator that wraps the *default* allocator, and then when you call `jemalloc_replace_dynamic(nullptr)` it switches back to the *default* allocator. This commits makes numerous improvements. - It removes the "flip-flopping" between malloc tables, which didn't really work and isn't necessary. - `jemalloc_replace_dynamic()` now switches between the *original* malloc table and the new one, rather than the *default* malloc table and the new one. - It renames various things, to make the names shorter and clearer. - It clearly documents the dangers and limitations of `jemalloc_replace_dynamic()`. - It removes and inlines `profiler::Init()`, because there was only one call site. - It rearranges `install_memory_counter()` so the control flow is simpler. Differential Revision: https://phabricator.services.mozilla.com/D34266 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
build | ||
fallible | ||
gtest | ||
mozalloc | ||
replace | ||
volatile | ||
app.mozbuild | ||
moz.build | ||
moz.configure |