diff options
Diffstat (limited to 'init/init_sdm660.cpp')
-rw-r--r-- | init/init_sdm660.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/init/init_sdm660.cpp b/init/init_sdm660.cpp index 6d58717..63e7d79 100644 --- a/init/init_sdm660.cpp +++ b/init/init_sdm660.cpp @@ -49,6 +49,7 @@ char const *heapgrowthlimit; char const *heapsize; char const *heapminfree; char const *heapmaxfree; +char const *heaptargetutilization; void check_device() { @@ -56,20 +57,30 @@ void check_device() sysinfo(&sys); - if (sys.totalram > 3072ull * 1024 * 1024) { - // from - phone-xxhdpi-4096-dalvik-heap.mk + if (sys.totalram > 5072ull * 1024 * 1024) { + // from - phone-xhdpi-6144-dalvik-heap.mk heapstartsize = "16m"; heapgrowthlimit = "256m"; heapsize = "512m"; - heapminfree = "4m"; - heapmaxfree = "8m"; - } else if (sys.totalram > 2048ull * 1024 * 1024) { - // from - phone-xxhdpi-3072-dalvik-heap.mk + heaptargetutilization = "0.5"; + heapminfree = "8m"; + heapmaxfree = "32m"; + } else if (sys.totalram > 3072ull * 1024 * 1024) { + // from - phone-xxhdpi-4096-dalvik-heap.mk + heapstartsize = "8m"; + heapgrowthlimit = "256m"; + heapsize = "512m"; + heaptargetutilization = "0.6"; + heapminfree = "8m"; + heapmaxfree = "16m"; + } else { + // from - phone-xhdpi-2048-dalvik-heap.mk heapstartsize = "8m"; - heapgrowthlimit = "288m"; - heapsize = "768m"; + heapgrowthlimit = "192m"; + heapsize = "512m"; + heaptargetutilization = "0.75"; heapminfree = "512k"; - heapmaxfree = "8m"; + heapmaxfree = "8m"; } } @@ -80,7 +91,7 @@ void vendor_load_properties() property_set("dalvik.vm.heapstartsize", heapstartsize); property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit); property_set("dalvik.vm.heapsize", heapsize); - property_set("dalvik.vm.heaptargetutilization", "0.75"); + property_set("dalvik.vm.heaptargetutilization", heaptargetutilization); property_set("dalvik.vm.heapminfree", heapminfree); property_set("dalvik.vm.heapmaxfree", heapmaxfree); } |