Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3c6c63b authored by Christopher Ferris's avatar Christopher Ferris Committed by android-build-merger
Browse files

Merge "Remove gMallocLeakZygoteChild."

am: 31c0ceba

Change-Id: Idf2885d706ba968c12e93b3fae073d6b291bd654
parents ef56b49d 31c0ceba
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -72,6 +72,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>
@@ -476,12 +477,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);