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

Commit ed93aa12 authored by Uday Kiran jandhyala's avatar Uday Kiran jandhyala Committed by Gerrit - the friendly Code Review server
Browse files

Adjusting OOM Adj values for 64 bit

After recent Google's merge, threshold for different OOM Adj levels
turns out to be same for both 32 & 64 bit

Correcting this to ensure the thresholds are different for 32 & 64 bit

CRs-Fixed: 787912

Change-Id: I41e8db2875b65d35b0b8fb43fbf3ecc7f7cc5b5f
parent 05b93e7b
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -251,6 +251,11 @@ final class ProcessList {
        // memory than just for 64 bit.  This should probably have some more
        // tuning done, so not deleting it quite yet...
        final boolean is64bit = Build.SUPPORTED_64_BIT_ABIS.length > 0;
        if (is64bit) {
            // Increase the high min-free levels for cached processes for 64-bit
            mOomMinFreeHigh[4] = 225000;
            mOomMinFreeHigh[5] = 325000;
        }

        for (int i=0; i<mOomAdj.length; i++) {
            int low = 0;
@@ -276,17 +281,6 @@ final class ProcessList {
                mOomMinFree[i] = (int)(low + ((high-low)*scale));
            }
        }
        if (Build.SUPPORTED_64_BIT_ABIS.length > 0) {
            // Increase the high min-free levels for cached processes for 64-bit
            mOomMinFreeHigh[4] = 225000;
            mOomMinFreeHigh[5] = 325000;
        }

        for (int i=0; i<mOomAdj.length; i++) {
            int low = mOomMinFreeLow[i];
            int high = mOomMinFreeHigh[i];
            mOomMinFree[i] = (int)(low + ((high-low)*scale));
        }

        if (minfree_abs >= 0) {
            for (int i=0; i<mOomAdj.length; i++) {