/usr/include/root/TMemStatHook.h is in libroot-misc-memstat-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | // @(#)root/memstat:$Id$
// Author: Anar Manafov (A.Manafov@gsi.de) 2008-03-02
/*************************************************************************
* Copyright (C) 1995-2010, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
//
// TYamsMemHook
// Non standard C/C++ functions
// Needed for memory statistic
#ifndef ROOT_TMemStatHook
#define ROOT_TMemStatHook
#if defined(__APPLE__)
#ifndef __CINT__
#include <malloc/malloc.h>
#endif
typedef void (*zoneMallocHookFunc_t)(void *ptr, size_t size);
typedef void (*zoneFreeHookFunc_t)(void *ptr);
#endif
class TMemStatHook {
public:
#if !defined(__APPLE__)
//
// Memory management HOOK functions
//
typedef void*(*MallocHookFunc_t)(size_t size, const void *caller);
typedef void (*FreeHookFunc_t)(void *ptr, const void *caller);
static MallocHookFunc_t GetMallocHook(); // malloc function getter
static FreeHookFunc_t GetFreeHook(); // free function getter
static void SetMallocHook(MallocHookFunc_t p); // malloc function setter
static void SetFreeHook(FreeHookFunc_t p); // free function setter
#else
//
// Public methods for Mac OS X
//
static void trackZoneMalloc(zoneMallocHookFunc_t pm, zoneFreeHookFunc_t pf);
static void untrackZoneMalloc();
#endif
};
#endif
|