From a531859d0961b18829b229f90809391b11aa01ef Mon Sep 17 00:00:00 2001 From: pandx Date: Tue, 5 Nov 2024 15:50:22 +0800 Subject: [PATCH] modify log info. --- threadfunc/thread_func.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/threadfunc/thread_func.cpp b/threadfunc/thread_func.cpp index 7b8a683..fc83806 100644 --- a/threadfunc/thread_func.cpp +++ b/threadfunc/thread_func.cpp @@ -348,9 +348,9 @@ bool InsufficientFreeMemory() { char name1[20]; std::string strMemFree = GetFileContent("/proc/meminfo", 2); sscanf(strMemFree.c_str(), "%s%ld", name1, &mem_free); - mem_free = mem_free / 1024; - zlog_warn(zct, "free memory: %ld MB", mem_free); + mem_free = mem_free / 1024; if (mem_free < 80) { + zlog_warn(zct, "free memory: %ld MB", mem_free); return true; } else { return false;