From 973111e1402fc8ecb071bd2e8ba62b90c7855376 Mon Sep 17 00:00:00 2001 From: kamikaonashi Date: Sat, 6 Jul 2024 19:31:08 +0200 Subject: [PATCH] stone: libinit: set memory tweaks only for 4GB Users 6 and 8 GB Users are fine. atleast for now Signed-off-by: Arijit78 --- libinit/libinit_dalvik_heap.cpp | 10 ++++++++++ properties/system.prop | 12 ------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libinit/libinit_dalvik_heap.cpp b/libinit/libinit_dalvik_heap.cpp index eb49a82..b98e748 100644 --- a/libinit/libinit_dalvik_heap.cpp +++ b/libinit/libinit_dalvik_heap.cpp @@ -58,8 +58,18 @@ void set_dalvik_heap() { else dhi = &dalvik_heap_info_4096; + /* Set props for 4GB Users */ if (sys.totalram < GB(5)) property_override("ro.config.avoid_gfx_accel", "true"); + property_override("ro.config.fha_enable", "true"); + property_override("ro.sys.fw.bg_apps_limit", "32"); + property_override("ro.config.dha_cached_max", "16"); + property_override("ro.config.dha_empty_max", "42"); + property_override("ro.config.dha_empty_init", "32"); + property_override("ro.config.dha_lmk_scale", "0.545"); + property_override("ro.config.dha_th_rate", "2.3"); + property_override("ro.config.sdha_apps_bg_max", "64"); + property_override("ro.config.sdha_apps_bg_min", "8"); property_override(HEAPSTARTSIZE_PROP, dhi->heapstartsize); property_override(HEAPGROWTHLIMIT_PROP, dhi->heapgrowthlimit); diff --git a/properties/system.prop b/properties/system.prop index cc20f60..912edfe 100644 --- a/properties/system.prop +++ b/properties/system.prop @@ -12,18 +12,6 @@ vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,org.line # CNE persist.vendor.cne.feature=1 - -# RAM -ro.config.fha_enable=true -ro.sys.fw.bg_apps_limit=32 -ro.config.dha_cached_max=16 -ro.config.dha_empty_max=42 -ro.config.dha_empty_init=32 -ro.config.dha_lmk_scale=0.545 -ro.config.dha_th_rate=2.3 -ro.config.sdha_apps_bg_max=64 -ro.config.sdha_apps_bg_min=8 - # LMKD/PSI ro.lmk.use_psi=true ro.lmk.low=1001