AllocatedBlocks HeapProfiler::blocks;
// Override initialising hook from the C library.
-void (*__malloc_initialize_hook) (void) = HeapProfiler::InitHooks;
+void (* volatile __malloc_initialize_hook) (void) = HeapProfiler::InitHooks;
// Variables to save original hooks.
void *(*HeapProfiler::old_malloc_hook)(size_t, const void *);
unsigned long HeapProfiler::GetMaxHeapConsumption() {
return maxConsumption;
}
+void HeapProfiler::ResetMaxHeapConsumption() {
+ maxConsumption = 0;
+}
unsigned long HeapProfiler::GetHeapConsumption() {
return consumption;