diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2020-02-23 14:23:53 +0100 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-04-30 00:49:34 +0300 |
commit | c839b2515e833ced7f8b3d0d47df62082d007384 (patch) | |
tree | cbf4fc47fc1d2dcbe9076f969c7c580ead080e97 | |
parent | d5763c2d21d287417856a080e67d6f391effb790 (diff) |
sdm660-common: init: Rework dalvik heap values
* Fixup some wrong values
* Add support for 6gb devices
Change-Id: I82eba78f85afe6dfa5cd0eb7e86e997a0b72e929
-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); } |