Revert "potter: init: set dalvik heap props based on detected RAM size"

(reverted from commit 5bdfbe4550)

Change-Id: I5f896c1f5aa8c142569ca4bbf214cf6a85f28e43
This commit is contained in:
Vachounet
2017-05-17 08:04:29 +02:00
parent 15be9a1f21
commit 7cf50e68fd
2 changed files with 5 additions and 25 deletions

View File

@@ -27,9 +27,7 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <fcntl.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
#include "vendor_init.h"
#include "property_service.h"
@@ -51,7 +49,6 @@ void num_sims() {
void vendor_load_properties()
{
struct sysinfo sys;
std::string platform = property_get("ro.board.platform");
if (platform != ANDROID_TARGET)
@@ -81,27 +78,5 @@ void vendor_load_properties()
if (sku == "XT1683") {
property_set("ro.hw.dtv", "true");
}
sysinfo(&sys);
if (sys.totalram > 3072ull * 1024 * 1024) {
property_set("dalvik.vm.heapstartsize", "8m");
property_set("dalvik.vm.heapgrowthlimit", "384m");
property_set("dalvik.vm.heapsize", "1024m");
property_set("dalvik.vm.heapminfree", "4m");
property_set("dalvik.vm.heapmaxfree", "16m");
} else if (sys.totalram > 2048ull * 1024 * 1024) {
property_set("dalvik.vm.heapstartsize", "8m");
property_set("dalvik.vm.heapgrowthlimit", "288m");
property_set("dalvik.vm.heapsize", "768m");
property_set("dalvik.vm.heapminfree", "512k");
property_set("dalvik.vm.heapmaxfree", "8m");
} else {
property_set("dalvik.vm.heapstartsize", "16m");
property_set("dalvik.vm.heapgrowthlimit", "192m");
property_set("dalvik.vm.heapsize", "512m");
property_set("dalvik.vm.heapminfree", "2m");
property_set("dalvik.vm.heapmaxfree", "8m");
}
}

View File

@@ -77,6 +77,11 @@ ro.core_ctl_max_cpu=4
ro.core_ctl_min_cpu=2
# Dalvik
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapmaxfree=8m
dalvik.vm.heapminfree=512k
dalvik.vm.heapsize=384m
dalvik.vm.heapstartsize=8m
dalvik.vm.heaptargetutilization=0.75
# Display