mem: 优化 C 内存统计, 缓解多线程竞争导致的 skynet_malloc 性能下降 (#2083)

* mem: 优化 C 内存统计, 缓解多线程竞争导致的 skynet_malloc 性能下降

* rm unused SPMC_STEP_LG macro

---------

Co-authored-by: efve.zff <efve.zff@alibaba-inc.com>
This commit is contained in:
EfveZombie
2025-09-11 21:23:07 +08:00
committed by GitHub
parent 754932cef4
commit 528b6bd32f
5 changed files with 182 additions and 69 deletions

View File

@@ -5,6 +5,8 @@
#include <stdbool.h>
#include <lua.h>
#include "mem_info.h"
extern size_t malloc_used_memory(void);
extern size_t malloc_memory_block(void);
extern void memory_info_dump(const char *opts);
@@ -17,4 +19,3 @@ extern int dump_mem_lua(lua_State *L);
extern size_t malloc_current_memory(void);
#endif /* SKYNET_MALLOC_HOOK_H */