ATLAS Offline Software
MemoryTrace.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HEPHAESTUS_MEMORYTRACE_H
6 #define HEPHAESTUS_MEMORYTRACE_H
7 
8 /*
9  Holder for memory trace information
10 */
11 
12 #include "Hephaestus/stackstash.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
19  unsigned long size;
21 };
22 
23 extern unsigned long hhh_gBacktraceSize;
24 
25 /* allocate a fresh memory trace */
27 
28 /* deallocate an old memory trace */
29 void hhh_MemoryTrace_delete( void *trace );
30 
31 /* initialize a newly created MemoryTrace */
33  StackElement* addresses, long depth);
34 
35 /* get the type that was newed, if available */
36 const char* hhh_MemoryTrace_getType( struct hhh_MemoryTrace *mt );
37 
38 /* report on traceback */
39 void hhh_MemoryTrace_print( FILE*, struct hhh_MemoryTrace *mt, int hideMemAddr );
40 
41 /* comparison function, returns like strcmp */
42 int hhh_MemoryTracePtr_compare( const void *pmt1, const void *pmt2 );
43 
44 #ifdef __cplusplus
45 } /* extern "C" */
46 #endif
47 
48 /* clarifying access to memory trace members */
49 #define hhh_MT_ORIGINATOR( b ) (*STACK_HANDLE_ELEMENT ((b).handle))
50 
51 #endif /* !HEPHAESTUS_MEMORYTRACE_H */
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
StackElement
void * StackElement
One element of a stack trace.
Definition: stackstash.h:74
StackHandle_
Unique reference for a stack trace.
Definition: stackstash.h:82
hhh_MemoryTrace_getType
const char * hhh_MemoryTrace_getType(struct hhh_MemoryTrace *mt)
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
hhh_MemoryTrace_new
struct hhh_MemoryTrace * hhh_MemoryTrace_new()
hhh_MemoryTrace_delete
void hhh_MemoryTrace_delete(void *trace)
hhh_MemoryTrace_initialize
void hhh_MemoryTrace_initialize(struct hhh_MemoryTrace *mt, long size, StackElement *addresses, long depth)
hhh_MemoryTracePtr_compare
int hhh_MemoryTracePtr_compare(const void *pmt1, const void *pmt2)
hhh_gBacktraceSize
unsigned long hhh_gBacktraceSize
hhh_MemoryTrace_print
void hhh_MemoryTrace_print(FILE *, struct hhh_MemoryTrace *mt, int hideMemAddr)
hhh_MemoryTrace
Definition: MemoryTrace.h:18
hhh_MemoryTrace::size
unsigned long size
Definition: MemoryTrace.h:19
stackstash.h
hhh_MemoryTrace::handle
StackHandle * handle
Definition: MemoryTrace.h:20