From d6e3ec308a7c208e2c7f473f481baf69b29edb2d Mon Sep 17 00:00:00 2001 From: jsj Date: Thu, 20 Jan 2022 08:12:43 +0000 Subject: [PATCH] =?UTF-8?q?IssueNo:#I4RAJM:optimizer=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=A4=B1=E8=B4=A5=E5=AF=BC=E8=87=B4=E7=9A=84foundatio?= =?UTF-8?q?n=E5=B4=A9=E6=BA=83=20Description:=20Fix=20foundation=20crash?= =?UTF-8?q?=20issue=20caused=20by=20optimizer=20init=20failed=20Sig:SIG=5F?= =?UTF-8?q?ApplicationFramework=20Feature=20or=20Bugfix:Bugfix=20Binary=20?= =?UTF-8?q?Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jsj Change-Id: If7c6b6543c1610bb22de8427ebc4cfee09307db8 --- services/appmgr/src/cgroup_manager.cpp | 4 ++-- services/appmgr/src/process_optimizer.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/appmgr/src/cgroup_manager.cpp b/services/appmgr/src/cgroup_manager.cpp index aeb33bfaf2d..886961a9d43 100644 --- a/services/appmgr/src/cgroup_manager.cpp +++ b/services/appmgr/src/cgroup_manager.cpp @@ -310,8 +310,8 @@ void CgroupManager::OnReadable(int32_t fd) { APP_LOGW("system low memory alert."); - if (!LowMemoryAlert || LowMemoryAlert) { - APP_LOGW("OnReadable 'LowMemoryAlert' come."); + if (!LowMemoryAlert) { + APP_LOGW("'LowMemoryAlert' not available."); return; } diff --git a/services/appmgr/src/process_optimizer.cpp b/services/appmgr/src/process_optimizer.cpp index 3af3f1c3d80..534f4cd5df5 100644 --- a/services/appmgr/src/process_optimizer.cpp +++ b/services/appmgr/src/process_optimizer.cpp @@ -78,6 +78,8 @@ ProcessOptimizer::ProcessOptimizer(const LmksClientPtr &lmksClient, int suspendT ProcessOptimizer::~ProcessOptimizer() { + APP_LOGI("ProcessOptimizer destructed"); + DelayedSingleton::GetInstance()->LowMemoryAlert = nullptr; if (lmksClient_) { lmksClient_->ProcPurge(); } -- Gitee