off features. -->
<bool name="config_avoidGfxAccel">false</bool>
+ <!-- Device configuration setting the minfree tunable in the lowmemorykiller in the kernel.
+ A high value will cause the lowmemorykiller to fire earlier, keeping more memory
+ in the file cache and preventing I/O thrashing, but allowing fewer processes to
+ stay in memory. A low value will keep more processes in memory but may cause
+ thrashing if set too low. Overrides the default value chosen by ActivityManager
+ based on screen size and total memory for the largest lowmemorykiller bucket, and
+ scaled proportionally to the smaller buckets. -1 keeps the default. -->
+ <integer name="config_lowMemoryKillerMinFreeKbytesAbsolute">-1</integer>
+
+ <!-- Device configuration adjusting the minfree tunable in the lowmemorykiller in the
+ kernel. A high value will cause the lowmemorykiller to fire earlier, keeping more
+ memory in the file cache and preventing I/O thrashing, but allowing fewer processes
+ to stay in memory. A low value will keep more processes in memory but may cause
+ thrashing if set too low. Directly added to the default value chosen by
+ ActivityManager based on screen size and total memory for the largest lowmemorykiller
+ bucket, and scaled proportionally to the smaller buckets. 0 keeps the default. -->
+ <integer name="config_lowMemoryKillerMinFreeKbytesAdjust">0</integer>
+
<!-- The duration (in milliseconds) that the radio will scan for a signal
when there's no network connection. If the scan doesn't timeout, use zero -->
<integer name="config_radioScanningTimeout">0</integer>
<java-symbol type="integer" name="config_cursorWindowSize" />
<java-symbol type="integer" name="config_longPressOnPowerBehavior" />
+ <java-symbol type="integer" name="config_lowMemoryKillerMinFreeKbytesAdjust" />
+ <java-symbol type="integer" name="config_lowMemoryKillerMinFreeKbytesAbsolute" />
<java-symbol type="integer" name="config_max_pan_devices" />
<java-symbol type="integer" name="config_ntpPollingInterval" />
<java-symbol type="integer" name="config_ntpPollingIntervalShorter" />
<java-symbol type="integer" name="config_lockSoundVolumeDb" />
<java-symbol type="integer" name="config_multiuserMaximumUsers" />
<java-symbol type="integer" name="config_safe_media_volume_index" />
-
<java-symbol type="color" name="tab_indicator_text_v4" />
<java-symbol type="dimen" name="accessibility_touch_slop" />
import com.android.internal.util.MemInfoReader;
import com.android.server.wm.WindowManagerService;
+import android.content.res.Resources;
import android.graphics.Point;
import android.util.Slog;
import android.view.Display;
float scale = scaleMem > scaleDisp ? scaleMem : scaleDisp;
if (scale < 0) scale = 0;
else if (scale > 1) scale = 1;
+ int minfree_adj = Resources.getSystem().getInteger(com.android.internal.R.integer.config_lowMemoryKillerMinFreeKbytesAdjust);
+ int minfree_abs = Resources.getSystem().getInteger(com.android.internal.R.integer.config_lowMemoryKillerMinFreeKbytesAbsolute);
+
for (int i=0; i<mOomAdj.length; i++) {
long low = mOomMinFreeLow[i];
long high = mOomMinFreeHigh[i];
mOomMinFree[i] = (long)(low + ((high-low)*scale));
+ }
+
+ if (minfree_abs >= 0) {
+ for (int i=0; i<mOomAdj.length; i++) {
+ mOomMinFree[i] = (long)((float)minfree_abs * mOomMinFree[i] / mOomMinFree[mOomAdj.length - 1]);
+ }
+ }
+ if (minfree_adj != 0) {
+ for (int i=0; i<mOomAdj.length; i++) {
+ mOomMinFree[i] += (long)((float)minfree_adj * mOomMinFree[i] / mOomMinFree[mOomAdj.length - 1]);
+ if (mOomMinFree[i] < 0) {
+ mOomMinFree[i] = 0;
+ }
+ }
+ }
+
+ for (int i=0; i<mOomAdj.length; i++) {
if (i > 0) {
adjString.append(',');
memString.append(',');