sdm660-common: libinit: remove heap and dalvik configs from libinit
This commit is contained in:
parent
351013a675
commit
f749ead6c7
2 changed files with 9 additions and 31 deletions
|
@ -78,43 +78,12 @@ void property_override_dual(char const system_prop[],
|
||||||
property_override(vendor_prop, value);
|
property_override(vendor_prop, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_device()
|
|
||||||
{
|
|
||||||
struct sysinfo sys;
|
|
||||||
|
|
||||||
sysinfo(&sys);
|
|
||||||
|
|
||||||
if (sys.totalram > 3072ull * 1024 * 1024) {
|
|
||||||
// from - phone-xxhdpi-4096-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
|
|
||||||
heapstartsize = "8m";
|
|
||||||
heapgrowthlimit = "288m";
|
|
||||||
heapsize = "768m";
|
|
||||||
heapminfree = "512k";
|
|
||||||
heapmaxfree = "8m";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void vendor_load_properties()
|
void vendor_load_properties()
|
||||||
{
|
{
|
||||||
check_device();
|
|
||||||
#ifdef TARGET_HAVE_LIBINIT
|
#ifdef TARGET_HAVE_LIBINIT
|
||||||
init_target_properties();
|
init_target_properties();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
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.heapminfree", heapminfree);
|
|
||||||
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
|
||||||
|
|
||||||
std::string product = GetProperty("ro.product.name", "");
|
std::string product = GetProperty("ro.product.name", "");
|
||||||
if (product.find("clover") != std::string::npos) {
|
if (product.find("clover") != std::string::npos) {
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,15 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
persist.vendor.camera.exif.make=Xiaomi \
|
persist.vendor.camera.exif.make=Xiaomi \
|
||||||
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi
|
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,com.qualcomm.qti.qmmi
|
||||||
|
|
||||||
|
# Dalvik
|
||||||
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
|
dalvik.vm.heapgrowthlimit=256m \
|
||||||
|
dalvik.vm.heapstartsize=8m \
|
||||||
|
dalvik.vm.heapsize=512m \
|
||||||
|
dalvik.vm.heaptargetutilization=0.75 \
|
||||||
|
dalvik.vm.heapminfree=512k \
|
||||||
|
dalvik.vm.heapmaxfree=8m
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
debug.hwui.renderer=skiagl \
|
debug.hwui.renderer=skiagl \
|
||||||
|
|
Loading…
Reference in a new issue