⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmgdmalloc.h.fancy

📁 基于chord算法的p2p文件系统。A p2p file system based on chord.
💻 FANCY
字号:
#ifndef __TMG_DMALLOC_H#define __TMG_DMALLOC_H//// Usage://// ./configure --with-tmgdmalloc// #include "tmgdmalloc.h"//// Then use New rather than new.//// __tmg_dmalloc_stats will tell you the location of un-delete-d objects.//#include "config.h"#ifdef HAVE_EXT_HASH_MAP# include <ext/hash_map>using namespace __gnu_cxx;namespace __gnu_cxx {#else# include <hash_map>using namespace std;namespace std {#endif  template<> struct hash<void*> {    size_t operator()(void *x) const {      return (size_t) x;    }  };}void __tmg_dmalloc_new(void *, size_t, const char*, unsigned);void __tmg_dmalloc_del(void *);void __tmg_dmalloc_stats();void __tmg_dmalloc_info(void *p);// if WITH_TMGDMALLOC, then new and delete will go through tmgdmalloc and will// not be cached.//// otherwise it will use the ones in cache.Cvoid  operator delete(void *p);void  operator delete[](void *p);#ifdef WITH_TMGDMALLOCvoid* operator new(size_t, const char*, unsigned);void* operator new[](size_t, const char*, unsigned);# define New new(__FILE__, __LINE__)#elsevoid* operator new(size_t);void* operator new[](size_t);# define New new#endif // WITH_TMGDMALLOC#endif //  __TMG_DMALLOC_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -