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

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

Merge "Merge "Set the decay timer for all forked apps." am: 232ce786 am:...

Merge "Merge "Set the decay timer for all forked apps." am: 232ce786 am: 241fb2fc am: 50ee43bb" into oc-dev-plus-aosp
am: 5deb5277

Change-Id: I8f96bfcb9f9126e2617d2183a08a00293a253dce
parents f1371029 5deb5277
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <fcntl.h>
#include <grp.h>
#include <inttypes.h>
#include <malloc.h>
#include <mntent.h>
#include <paths.h>
#include <signal.h>
@@ -519,6 +520,9 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
    // The child process.
    gMallocLeakZygoteChild = 1;

    // Set the jemalloc decay time to 1.
    mallopt(M_DECAY_TIME, 1);

    // Clean up any descriptors which must be closed immediately
    DetachDescriptors(env, fdsToClose);