Merge "Hook up large heap API." into honeycomb

This commit is contained in:
Dianne Hackborn
2011-01-19 16:28:31 -08:00
committed by Android (Google) Code Review
4 changed files with 9 additions and 4 deletions

View File

@@ -89,6 +89,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/target/common/obj/APPS/Music2_in
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/nfc/INdefTag.java)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libstagefright_aacdec_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libstagefright_mp3dec_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST

View File

@@ -19,4 +19,5 @@
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapstartsize=5m \
dalvik.vm.heapsize=32m
dalvik.vm.growthlimit=32m \
dalvik.vm.heapsize=128m

View File

@@ -64,8 +64,11 @@ public class ActivityManager {
static public int staticGetMemoryClass() {
// Really brain dead right now -- just take this from the configured
// vm heap size, and assume it is in megabytes and thus ends with "m".
String vmHeapSize = SystemProperties.get("dalvik.vm.smallheapsize", "16m");
return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1));
String vmHeapSize = SystemProperties.get("dalvik.vm.growthlimit", "");
if (vmHeapSize != null && !"".equals(vmHeapSize)) {
return Integer.parseInt(vmHeapSize.substring(0, vmHeapSize.length()-1));
}
return staticGetLargeMemoryClass();
}
/**

View File

@@ -3463,7 +3463,7 @@ public final class ActivityThread {
}
if ((data.appInfo.flags&ApplicationInfo.FLAG_LARGE_HEAP) != 0) {
// XXX bump up Dalvik's heap.
dalvik.system.VMRuntime.getRuntime().clearGrowthLimit();
}
// If the app is being launched for full backup or restore, bring it up in