malloc hook for jemalloc and c memory info dump

This commit is contained in:
Cloud Wu
2014-04-18 17:38:18 +08:00
parent 5b68dc6a17
commit ac1a0a4c99
8 changed files with 318 additions and 8 deletions

13
skynet-src/malloc_hook.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef __MALLOC_HOOK_H
#define __MALLOC_HOOK_H
#include <stdlib.h>
extern size_t malloc_used_memory(void);
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 void dump_c_mem(void);
#endif /* __MALLOC_HOOK_H */