Add jemalloc heap profilling in debug console

This commit is contained in:
wudeng
2019-04-30 15:35:43 +08:00
committed by 云风
parent 4159600fbc
commit 35aa00fb13
4 changed files with 69 additions and 10 deletions

View File

@@ -2,6 +2,7 @@
#define SKYNET_MALLOC_HOOK_H
#include <stdlib.h>
#include <stdbool.h>
#include <lua.h>
extern size_t malloc_used_memory(void);
@@ -9,6 +10,8 @@ extern size_t malloc_memory_block(void);
extern void memory_info_dump(void);
extern size_t mallctl_int64(const char* name, size_t* newval);
extern int mallctl_opt(const char* name, int* newval);
extern bool mallctl_bool(const char* name, bool* newval);
extern int mallctl_cmd(const char* name);
extern void dump_c_mem(void);
extern int dump_mem_lua(lua_State *L);
extern size_t malloc_current_memory(void);