Remove gMallocLeakZygoteChild.

Bug: 130028357

Test: Verified that call is made and that memory is properly marked in a
Test: child as not in the Zygote.
Change-Id: I9b94637cc0e48eec3bbccfdc1afd531a1ee10a89
This commit is contained in:
Christopher Ferris
2019-04-09 16:42:32 -07:00
parent 3020965a4c
commit ed364d6caa

View File

@@ -73,6 +73,7 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
#include <bionic_malloc.h>
#include <cutils/ashmem.h>
#include <cutils/fs.h>
#include <cutils/multiuser.h>
@@ -493,12 +494,9 @@ static void EnableDebugger() {
}
}
// The debug malloc library needs to know whether it's the zygote or a child.
extern "C" int gMallocLeakZygoteChild;
static void PreApplicationInit() {
// The child process sets this to indicate it's not the zygote.
gMallocLeakZygoteChild = 1;
android_mallopt(M_SET_ZYGOTE_CHILD, nullptr, 0);
// Set the jemalloc decay time to 1.
mallopt(M_DECAY_TIME, 1);