gecko-dev/memory
Nicholas Nethercote 94ec493862 Bug 1557907 - Fix jemalloc_replace_dynamic(). r=glandium
`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
2019-06-13 20:42:19 +00:00
..
build Bug 1557907 - Fix jemalloc_replace_dynamic(). r=glandium 2019-06-13 20:42:19 +00:00
fallible Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
gtest Bug 1558365 - Simplify PtrInfoTag. r=glandium 2019-06-12 07:38:30 +00:00
mozalloc Bug 1553363 - Generalize the *_impl goop for allocation functions in mozglue. r=froydnj 2019-05-29 22:49:42 +00:00
replace Bug 1533240 - Replace DMD's custom TLS code with use of mozilla/ThreadLocal.h. r=erahm 2019-03-22 20:07:30 +00:00
volatile Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
app.mozbuild
moz.build
moz.configure