diff options
author | Christopher Ferris <cferris@google.com> | 2019-04-09 16:37:23 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2019-04-16 10:59:36 -0700 |
commit | ab1c43dd6da311a2df0d5fdf55d3971df64384cb (patch) | |
tree | a4fbe91cbf7b6c5add64eaa84163a5fab4789504 /libc/malloc_hooks/malloc_hooks.cpp | |
parent | c8c4babc33a84dabba513d4b7243f1dd3d2ea443 (diff) |
Remove gMallocLeakZygoteChild.
Remove this global variable and change the setting of it to non-zero
to a call to android_mallopt.
In addition, change the initialize function to use pass a bool* instead of
int*.
Bug: 130028357
Test: Ran malloc_debug/malloc_hooks/perfetto tests.
Change-Id: I20d382bdeaaf38aac6b9dcabea5b3dfab3c945f6
Merged-In: I20d382bdeaaf38aac6b9dcabea5b3dfab3c945f6
(cherry picked from commit 5225b342f0810c027df3d09fbbcef4d324b19b93)
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
-rw-r--r-- | libc/malloc_hooks/malloc_hooks.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/malloc_hooks/malloc_hooks.cpp b/libc/malloc_hooks/malloc_hooks.cpp index 07b668f08..b1c1d5060 100644 --- a/libc/malloc_hooks/malloc_hooks.cpp +++ b/libc/malloc_hooks/malloc_hooks.cpp @@ -48,7 +48,7 @@ const MallocDispatch* g_dispatch; // ------------------------------------------------------------------------ __BEGIN_DECLS -bool hooks_initialize(const MallocDispatch* malloc_dispatch, int* malloc_zygote_child, +bool hooks_initialize(const MallocDispatch* malloc_dispatch, bool* zygote_child, const char* options); void hooks_finalize(); void hooks_get_malloc_leak_info( @@ -97,7 +97,7 @@ static void* default_memalign_hook(size_t alignment, size_t bytes, const void*) __END_DECLS // ------------------------------------------------------------------------ -bool hooks_initialize(const MallocDispatch* malloc_dispatch, int*, const char*) { +bool hooks_initialize(const MallocDispatch* malloc_dispatch, bool*, const char*) { g_dispatch = malloc_dispatch; __malloc_hook = default_malloc_hook; __realloc_hook = default_realloc_hook; |