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);
void SetMaxCalls(Int_t maxcalls)
Set the maximum number of new/delete registered in the output Tree.
bool add(ULong_t addr, Int_t idx)
void Enable()
Enable memory hooks.
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 * fgInstance
tree to dump information
static void Close()
Close - a static function This method stops the manager, flashes all the buffered data and closes the...
static void * AllocHook(size_t size, const void *)
AllocHook - a static function A glibc memory allocation hook.
const UShort_t g_digestSize
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void Init()
old free function
SCustomDigest(UChar_t _val[g_digestSize])
static void MacAllocHook(void *ptr, size_t size)
AllocHook - a static function a special memory hook for Mac OS X memory zones.
UChar_t fValue[g_digestSize]
Container_t::value_type value_type
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
bool operator<(const SCustomDigest &a, const SCustomDigest &b)
TTree * fDumpTree
file to dump current information
void *(* MallocHookFunc_t)(size_t size, const void *caller)
virtual ~TMemStatMng()
if an instance is destructed - the hooks are reseted to old hooks
Bool_t fUseGNUBuiltinBacktrace
static void MacFreeHook(void *ptr)
AllocHook - a static function a special memory hook for Mac OS X memory zones.
1-D histogram with an int per channel (see TH1 documentation)}
void AddPointer(void *ptr, Int_t size)
Add pointer to table.
void Disable()
Disble memory hooks.
void(* FreeHookFunc_t)(void *ptr, const void *caller)
unsigned long long ULong64_t
std::map< SCustomDigest, Int_t > CRCSet_t
The TTimeStamp encapsulates seconds and ns since EPOCH.
void SetBufferSize(Int_t buffersize)
Set the maximum number of alloc/free calls to be buffered.
TMemStatHook::MallocHookFunc_t fPreviousMallocHook
Container_t::iterator pos_type
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
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 FreeHook(void *ptr, const void *)
FreeHook - a static function A glibc memory deallocation hook.
A TTree object has a header with a name and a title.
static TMemStatMng * GetInstance()
GetInstance - a static function Initialize a singleton of MemStat manager.
TMemStatHook::FreeHookFunc_t fPreviousFreeHook
old malloc function
TMemStatFAddrContainer fFAddrs
std::map< ULong_t, Int_t > Container_t