From 9efdcd969ed03cfbe8cfa692b8adcc46d954914a Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 28 Jan 2011 15:33:13 -0800 Subject: [PATCH] Fix issue #3401380: Raise OOM killer limits Change-Id: Ia9c82e7d31b7f1b89bf9650ebea697d9b3a64506 --- CleanSpec.mk | 2 ++ rootdir/init.rc | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/CleanSpec.mk b/CleanSpec.mk index b84e1b65e..069832dbd 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -47,3 +47,5 @@ # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) diff --git a/rootdir/init.rc b/rootdir/init.rc index 87f7e0e99..7a81a6ab8 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -211,15 +211,28 @@ on boot # Define the memory thresholds at which the above process classes will # be killed. These numbers are in pages (4k). - setprop ro.FOREGROUND_APP_MEM 2048 - setprop ro.VISIBLE_APP_MEM 3072 - setprop ro.PERCEPTIBLE_APP_MEM 4096 - setprop ro.HEAVY_WEIGHT_APP_MEM 4096 - setprop ro.SECONDARY_SERVER_MEM 6144 - setprop ro.BACKUP_APP_MEM 6144 - setprop ro.HOME_APP_MEM 6144 - setprop ro.HIDDEN_APP_MEM 7168 - setprop ro.EMPTY_APP_MEM 8192 + # These are currently tuned for tablets with approx 1GB RAM. + setprop ro.FOREGROUND_APP_MEM 8192 + setprop ro.VISIBLE_APP_MEM 10240 + setprop ro.PERCEPTIBLE_APP_MEM 12288 + setprop ro.HEAVY_WEIGHT_APP_MEM 12288 + setprop ro.SECONDARY_SERVER_MEM 14336 + setprop ro.BACKUP_APP_MEM 14336 + setprop ro.HOME_APP_MEM 14336 + setprop ro.HIDDEN_APP_MEM 16384 + setprop ro.EMPTY_APP_MEM 20480 + + # Old values for phones. Should probably be adjusted up for the next + # phone version. + #setprop ro.FOREGROUND_APP_MEM 2048 + #setprop ro.VISIBLE_APP_MEM 3072 + #setprop ro.PERCEPTIBLE_APP_MEM 4096 + #setprop ro.HEAVY_WEIGHT_APP_MEM 4096 + #setprop ro.SECONDARY_SERVER_MEM 6144 + #setprop ro.BACKUP_APP_MEM 6144 + #setprop ro.HOME_APP_MEM 6144 + #setprop ro.HIDDEN_APP_MEM 7168 + #setprop ro.EMPTY_APP_MEM 8192 # Write value must be consistent with the above properties. # Note that the driver only supports 6 slots, so we have combined some of