Increase min free levels for cached processes on 64bit
Requires less memory pressure to start killing cached processes. Bug: 18241791 Change-Id: Ia02f5aee115535badc900330b9361f0099203e4f
This commit is contained in:
@@ -235,22 +235,16 @@ final class ProcessList {
|
||||
Slog.i("XXXXXX", "minfree_adj=" + minfree_adj + " minfree_abs=" + minfree_abs);
|
||||
}
|
||||
|
||||
// We've now baked in the increase to the basic oom values above, since
|
||||
// they seem to be useful more generally for devices that are tight on
|
||||
// memory than just for 64 bit. This should probably have some more
|
||||
// tuning done, so not deleting it quite yet...
|
||||
final boolean is64bit = false; //Build.SUPPORTED_64_BIT_ABIS.length > 0;
|
||||
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 (is64bit) {
|
||||
// On 64 bit devices, we consume more baseline RAM, because 64 bit is cool!
|
||||
// To avoid being all pagey and stuff, scale up the memory levels to
|
||||
// give us some breathing room.
|
||||
mOomMinFree[i] = (3*mOomMinFree[i])/2;
|
||||
}
|
||||
}
|
||||
|
||||
if (minfree_abs >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user