ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
19 unsigned long size;
21};
22
23extern unsigned long hhh_gBacktraceSize;
24
25/* allocate a fresh memory trace */
27
28/* deallocate an old memory trace */
29void 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 */
36const char* hhh_MemoryTrace_getType( struct hhh_MemoryTrace *mt );
37
38/* report on traceback */
39void hhh_MemoryTrace_print( FILE*, struct hhh_MemoryTrace *mt, int hideMemAddr );
40
41/* comparison function, returns like strcmp */
42int 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 */
void hhh_MemoryTrace_initialize(struct hhh_MemoryTrace *mt, long size, StackElement *addresses, long depth)
void hhh_MemoryTrace_print(FILE *, struct hhh_MemoryTrace *mt, int hideMemAddr)
int hhh_MemoryTracePtr_compare(const void *pmt1, const void *pmt2)
const char * hhh_MemoryTrace_getType(struct hhh_MemoryTrace *mt)
struct hhh_MemoryTrace * hhh_MemoryTrace_new()
unsigned long hhh_gBacktraceSize
void hhh_MemoryTrace_delete(void *trace)
std::string depth
tag string for intendation
Definition fastadd.cxx:46
void * StackElement
One element of a stack trace.
Definition stackstash.h:74
struct StackHandle_ StackHandle
Definition stackstash.h:86
unsigned long size
Definition MemoryTrace.h:19
StackHandle * handle
Definition MemoryTrace.h:20