diff --git a/init/init.cpp b/init/init.cpp index a1a7465..59be376 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -30,15 +30,14 @@ using android::base::GetProperty; using android::init::property_set; -char const *heapstartsize; -char const *heapgrowthlimit; -char const *heapsize; -char const *heapminfree; -char const *heapmaxfree; -char const *heaptargetutilization; - -void check_device() +void load_dalvik_properties() { + char const *heapstartsize; + char const *heapgrowthlimit; + char const *heapsize; + char const *heapminfree; + char const *heapmaxfree; + char const *heaptargetutilization; struct sysinfo sys; sysinfo(&sys); @@ -68,11 +67,6 @@ void check_device() heapminfree = "512k"; heapmaxfree = "8m"; } -} - -void vendor_load_properties() -{ - check_device(); property_set("dalvik.vm.heapstartsize", heapstartsize); property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit); @@ -81,3 +75,8 @@ void vendor_load_properties() property_set("dalvik.vm.heapminfree", heapminfree); property_set("dalvik.vm.heapmaxfree", heapmaxfree); } + +void vendor_load_properties() +{ + load_dalvik_properties(); +}