sm6250-common: init: group dalvik property initialization together
This commit is contained in:
parent
6fdeeb9833
commit
a0c7e0c3c9
@ -30,15 +30,13 @@
|
|||||||
using android::base::GetProperty;
|
using android::base::GetProperty;
|
||||||
using android::init::property_set;
|
using android::init::property_set;
|
||||||
|
|
||||||
char const *heapstartsize;
|
void load_dalvik_properties() {
|
||||||
char const *heapgrowthlimit;
|
char const *heapstartsize;
|
||||||
char const *heapsize;
|
char const *heapgrowthlimit;
|
||||||
char const *heapminfree;
|
char const *heapsize;
|
||||||
char const *heapmaxfree;
|
char const *heapminfree;
|
||||||
char const *heaptargetutilization;
|
char const *heapmaxfree;
|
||||||
|
char const *heaptargetutilization;
|
||||||
void check_device()
|
|
||||||
{
|
|
||||||
struct sysinfo sys;
|
struct sysinfo sys;
|
||||||
|
|
||||||
sysinfo(&sys);
|
sysinfo(&sys);
|
||||||
@ -59,12 +57,9 @@ void check_device()
|
|||||||
heaptargetutilization = "0.6";
|
heaptargetutilization = "0.6";
|
||||||
heapminfree = "8m";
|
heapminfree = "8m";
|
||||||
heapmaxfree = "16m";
|
heapmaxfree = "16m";
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void vendor_load_properties()
|
|
||||||
{
|
|
||||||
check_device();
|
|
||||||
|
|
||||||
property_set("dalvik.vm.heapstartsize", heapstartsize);
|
property_set("dalvik.vm.heapstartsize", heapstartsize);
|
||||||
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
||||||
@ -73,3 +68,7 @@ void vendor_load_properties()
|
|||||||
property_set("dalvik.vm.heapminfree", heapminfree);
|
property_set("dalvik.vm.heapminfree", heapminfree);
|
||||||
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vendor_load_properties() {
|
||||||
|
load_dalvik_properties();
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user