Skip to content

Commit

Permalink
Fix issue #3401380: Raise OOM killer limits
Browse files Browse the repository at this point in the history
Change-Id: Ia9c82e7d31b7f1b89bf9650ebea697d9b3a64506
  • Loading branch information
Dianne Hackborn committed Jan 28, 2011
1 parent 75e17a8 commit 9efdcd9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CleanSpec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
31 changes: 22 additions & 9 deletions rootdir/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9efdcd9

Please sign in to comment.