mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-30 07:26:53 +08:00
malloc大内存警告环境变量改名为MEM_WARN_SIZE
This commit is contained in:
parent
9cf6fea03e
commit
c0afcc48e5
@ -499,9 +499,9 @@ static void init_cookie(MemCookie *cookie, size_t c) {
|
|||||||
cookie->alloc_info->addBlock(c);
|
cookie->alloc_info->addBlock(c);
|
||||||
|
|
||||||
#if defined(MEM_WARING)
|
#if defined(MEM_WARING)
|
||||||
static auto env = getenv("MAX_MEM_SIZE");
|
static auto env = getenv("MEM_WARN_SIZE");
|
||||||
static size_t kMaxMemSize = atoll(env ? env : "0");
|
static size_t s_mem_waring_size = atoll(env ? env : "0");
|
||||||
if (kMaxMemSize > 1024 && c >= kMaxMemSize) {
|
if (s_mem_waring_size > 1024 && c >= s_mem_waring_size) {
|
||||||
print_mem_waring(c);
|
print_mem_waring(c);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user