summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-10-01 17:54:42 -0700
committerChristopher Ferris <cferris@google.com>2019-10-01 17:57:12 -0700
commitccff1b19effcecf1a0601448340d15abe71d411b (patch)
treea3e40e0d36a3f3beb31b73623d862cc606b9f151 /libc/malloc_hooks/malloc_hooks.cpp
parent3f869acf4f6f576018bd8cbff1004313421cb297 (diff)
Make it easy to switch between scudo and jemalloc.
Refactor some of the definitions to separate out all of the native allocator pieces into one place that can be changed easily. This should fix a few static libraries that appear to have accidentally included jemalloc wrapper functions. For example, I verified that libc_nomalloc.a no longer has references to any je_XXX functions. Modify the bionic_libc_platform_headers to not include any libraries. If this isn't updated, soong thinks there are cycles when used by libscudo. To enable scudo, change the libc_native_allocator_defaults defaults from libc_jemalloc5_defaults to libc_scudo_defaults and comment out the defaults: ["libc_scudo_wrapper_defaults"], line for the shared library libc_scudo. To do a final switch to scudo, it will be necessary to clean up some code in other parts of the tree, but this allows a single cl to enable or disable. Bug: 137795072 Test: Builds with jemalloc or scudo with a small change. Test: Ran bionic unit tests. Change-Id: I07bb5432a0d2b2f405f92412e8d04fb9c9e51b31
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions