From c0afcc48e596861047d5216dbee3077db3517ea9 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 31 Dec 2021 10:26:36 +0800 Subject: [PATCH] =?UTF-8?q?malloc=E5=A4=A7=E5=86=85=E5=AD=98=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E4=B8=BAMEM=5FWARN=5FSIZE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Common/config.cpp b/src/Common/config.cpp index 78bf847a..0750d16f 100644 --- a/src/Common/config.cpp +++ b/src/Common/config.cpp @@ -499,9 +499,9 @@ static void init_cookie(MemCookie *cookie, size_t c) { cookie->alloc_info->addBlock(c); #if defined(MEM_WARING) - static auto env = getenv("MAX_MEM_SIZE"); - static size_t kMaxMemSize = atoll(env ? env : "0"); - if (kMaxMemSize > 1024 && c >= kMaxMemSize) { + static auto env = getenv("MEM_WARN_SIZE"); + static size_t s_mem_waring_size = atoll(env ? env : "0"); + if (s_mem_waring_size > 1024 && c >= s_mem_waring_size) { print_mem_waring(c); } #endif