X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=HeapProfiler.cpp;h=63342a4840bd16a77476bff6521cd152cfa1fabf;hb=18a3c1f1b87744c78fde76f96c3e9cf43e137b36;hp=d3c46f805256d7e048cce7ccfb0536e7f88b2c8d;hpb=eb04a05de55af8957aea1353d21b5e5b98bd1006;p=SXSI%2FTextCollection.git diff --git a/HeapProfiler.cpp b/HeapProfiler.cpp index d3c46f8..63342a4 100644 --- a/HeapProfiler.cpp +++ b/HeapProfiler.cpp @@ -27,7 +27,7 @@ unsigned long HeapProfiler::consumption = 0, HeapProfiler::maxConsumption = 0; 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 *); @@ -37,6 +37,9 @@ void *(*HeapProfiler::old_realloc_hook)(void *, size_t, const void *); unsigned long HeapProfiler::GetMaxHeapConsumption() { return maxConsumption; } +void HeapProfiler::ResetMaxHeapConsumption() { + maxConsumption = 0; +} unsigned long HeapProfiler::GetHeapConsumption() { return consumption;