14 #ifdef CH_USE_MEMORY_TRACKING 30 #define callocMT(a_a,a_b) callocp (a_a, a_b, __FILE__, __LINE__) 31 #define reallocMT(a_a, a_b) reallocp(a_a, a_b, __FILE__, __LINE__) 32 #define mallocMT(a_a) mallocp (a_a, __FILE__, __LINE__) 33 #define freeMT(a_a) freep (a_a) 37 extern unsigned long long int ch_memcount;
39 void dumpmemorymap(
int a_sig);
45 void dumpmemoryabort();
48 int registerMemorySignals();
51 void ReportUnfreedMemory(ostream& a_os);
54 void ReportAllocatedMemory(ostream& a_os);
57 void ReportMemoryUsage(ostream& a_os);
69 void memtrackingOff();
71 void overallMemoryUsage(
long long& a_currentTotal,
74 void overallMemoryUsage();
76 void memtrackStamp(
Real& a_current,
95 static void ReportUnfreedMemory(ostream& a_os);
98 static void UnfreedMemory();
100 static void memTrackingOn();
102 static void memtrackingOff();
104 static void overallMemoryUsage(
long long& a_currentTotal,
106 static std::vector<void (*)()> s_memtrackAtExit;
135 void* mallocp(
size_t a_size,
139 void* reallocp(
void* a_p,
144 void* callocp(
size_t a_nelem,
149 void freep(
void* a_p);
153 #else // on CH_USE_MEMORY_TRACKING 157 #define callocMT(a_a,a_b) calloc (a_a, a_b) 158 #define reallocMT(a_a, a_b) realloc(a_a, a_b) 159 #define mallocMT(a_a) malloc (a_a) 160 #define freeMT(a_a) free (a_a) 177 #endif // ifdef CH_USE_MEMORY_TRACKING 179 #endif // include guard void RemoveTrack(void *a_addr, bool a_malloc)
Definition: memtrack.H:171
double Real
Definition: REAL.H:33
void AddTrack(void *a_addr, size_t a_asize, const char *a_fname, int a_lnum, bool a_malloc)
Definition: memtrack.H:162