16 #ifndef ROOT_TMemStatHook 17 #define ROOT_TMemStatHook 21 #if defined(__APPLE__) 23 #include <malloc/malloc.h> 25 typedef void (*zoneMallocHookFunc_t)(
void *ptr,
size_t size);
26 typedef void (*zoneFreeHookFunc_t)(
void *ptr);
31 #if !defined(__APPLE__) 35 typedef void*(*MallocHookFunc_t)(
size_t size,
const void *caller);
46 static void trackZoneMalloc(zoneMallocHookFunc_t pm, zoneFreeHookFunc_t pf);
47 static void untrackZoneMalloc();
static void SetFreeHook(FreeHookFunc_t p)
SetFreeHook - a static function Set pointer to function replacing free function.
static void SetMallocHook(MallocHookFunc_t p)
SetMallocHook - a static function Set pointer to function replacing alloc function.
void *(* MallocHookFunc_t)(size_t size, const void *caller)
static FreeHookFunc_t GetFreeHook()
GetFreeHook - a static function free function getter.
void(* FreeHookFunc_t)(void *ptr, const void *caller)
typedef void((*Func_t)())
static MallocHookFunc_t GetMallocHook()
GetMallocHook - a static function malloc function getter.