11#ifndef ROOT_TMemStatMng
12#define ROOT_TMemStatMng
67 if(
a.fValue[i] !=
b.fValue[i])
68 return (
a.fValue[i] <
b.fValue[i]);
75 typedef std::map<SCustomDigest, Int_t>
CRCSet_t;
96#if !defined(__APPLE__)
103 static void *
AllocHook(
size_t size,
const void* );
104 static void FreeHook(
void* ptr,
const void* );
108 void **stackPointers);
unsigned long long ULong64_t
#define ClassDef(name, id)
bool add(ULong_t addr, Int_t idx)
Container_t::iterator pos_type
Container_t::value_type value_type
std::map< ULong_t, Int_t > Container_t
Bool_t fUseGNUBuiltinBacktrace
std::map< SCustomDigest, Int_t > CRCSet_t
Int_t generateBTID(UChar_t *CRCdigest, Int_t stackEntries, void **stackPointers)
An internal function, which returns a bitid for a corresponding CRC digest cache variables.
static void MacAllocHook(void *ptr, size_t size)
AllocHook - a static function a special memory hook for Mac OS X memory zones.
TMemStatHook::FreeHookFunc_t fPreviousFreeHook
old malloc function
static void FreeHook(void *ptr, const void *)
FreeHook - a static function A glibc memory deallocation hook.
static void MacFreeHook(void *ptr)
AllocHook - a static function a special memory hook for Mac OS X memory zones.
static TMemStatMng * fgInstance
tree to dump information
void Disable()
Disble memory hooks.
TMemStatFAddrContainer fFAddrs
static void * AllocHook(size_t size, const void *)
AllocHook - a static function A glibc memory allocation hook.
TTree * fDumpTree
file to dump current information
virtual ~TMemStatMng()
if an instance is destructed - the hooks are reseted to old hooks
void Init()
old free function
void Enable()
Enable memory hooks.
void SetBufferSize(Int_t buffersize)
Set the maximum number of alloc/free calls to be buffered.
TMemStatHook::MallocHookFunc_t fPreviousMallocHook
void AddPointer(void *ptr, Int_t size)
Add pointer to table.
static void Close()
Close - a static function This method stops the manager, flashes all the buffered data and closes the...
void SetMaxCalls(Int_t maxcalls)
Set the maximum number of new/delete registered in the output Tree.
void FillTree()
loop on all entries in the buffer and fill the output Tree entries with alloc and free in the buffer ...
void SetUseGNUBuiltinBacktrace(Bool_t newVal)
static TMemStatMng * GetInstance()
GetInstance - a static function Initialize a singleton of MemStat manager.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with an int per channel (see TH1 documentation)}
void(* FreeHookFunc_t)(void *ptr, const void *caller)
void *(* MallocHookFunc_t)(size_t size, const void *caller)
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
The TTimeStamp encapsulates seconds and ns since EPOCH.
A TTree represents a columnar dataset.
bool operator<(const SCustomDigest &a, const SCustomDigest &b)
const UShort_t g_digestSize
UChar_t fValue[g_digestSize]
SCustomDigest(UChar_t _val[g_digestSize])