Revert "potter: init: set dalvik heap props based on detected RAM size"
(reverted from commit 5bdfbe4550)
Change-Id: I5f896c1f5aa8c142569ca4bbf214cf6a85f28e43
This commit is contained in:
@@ -27,9 +27,7 @@
|
|||||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/sysinfo.h>
|
|
||||||
|
|
||||||
#include "vendor_init.h"
|
#include "vendor_init.h"
|
||||||
#include "property_service.h"
|
#include "property_service.h"
|
||||||
@@ -51,7 +49,6 @@ void num_sims() {
|
|||||||
|
|
||||||
void vendor_load_properties()
|
void vendor_load_properties()
|
||||||
{
|
{
|
||||||
struct sysinfo sys;
|
|
||||||
std::string platform = property_get("ro.board.platform");
|
std::string platform = property_get("ro.board.platform");
|
||||||
|
|
||||||
if (platform != ANDROID_TARGET)
|
if (platform != ANDROID_TARGET)
|
||||||
@@ -81,27 +78,5 @@ void vendor_load_properties()
|
|||||||
if (sku == "XT1683") {
|
if (sku == "XT1683") {
|
||||||
property_set("ro.hw.dtv", "true");
|
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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,11 @@ ro.core_ctl_max_cpu=4
|
|||||||
ro.core_ctl_min_cpu=2
|
ro.core_ctl_min_cpu=2
|
||||||
|
|
||||||
# Dalvik
|
# 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
|
dalvik.vm.heaptargetutilization=0.75
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
|
|||||||
Reference in New Issue
Block a user