Create a branch by copying library-split to avoid having to merge from git.
[SXSI/TextCollection.git] / HeapProfiler.cpp
index 348fee6..7091a53 100644 (file)
@@ -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 *);