ATLAS Offline Software
PerfMonTestManyLeaksAlg.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // PerfMonTestManyLeaksAlg.h
8 // Header file for class PerfMonTest::ManyLeaksAlg
9 // Author: R.Sesuter
11 #ifndef PERFMONTESTS_PERFMONTESTMANYLEAKSALG_H
12 #define PERFMONTESTS_PERFMONTESTMANYLEAKSALG_H
13 
14 // STL includes
15 #include <string>
16 #include <list>
17 #include <vector>
18 
19 
20 // FrameWork includes
23 
24 namespace PerfMonTest {
25 
26 class ManyLeaksAlg : public AthAlgorithm
27 {
29  // Public methods:
31  public:
32 
33  // Copy constructor:
34 
36  ManyLeaksAlg( const std::string& name, ISvcLocator* pSvcLocator );
37 
39  virtual ~ManyLeaksAlg();
40 
41  // Assignment operator:
42  //ManyLeaksAlg &operator=(const ManyLeaksAlg &alg);
43 
44  // Athena algorithm's Hooks
45  virtual StatusCode initialize();
46  virtual StatusCode execute();
47  virtual StatusCode finalize();
48 
50  // Private data:
52  private:
53 
56 
57  long* stillReachableFct(long** array);
58 
60  long* possibleLostFct(long** array);
61 
63  long* indirectlyLostFct(long** array);
64 
66  long* definitelyLostFct(long** array);
67 
69  void leakAll();
70 
73 
76 
77  private:
78 
79  // this one's still reachable
81 
82  // this one's possible lost
84 
85  // this one's indirectly lost
87 
88  // this one's definitely lost
90 
91  // we still need to reference some pointers,
92  // otherwise vagrind labels everything definitely lost
93  static long **m_pointers ATLAS_THREAD_SAFE;
94 };
95 
96 } //> end namespace PerfMonTest
97 
98 #endif //> PERFMONTESTS_PERFMONTESTMANYLEAKSALG_H
PerfMonTest::ManyLeaksAlg::indirectlyLostFct
long * indirectlyLostFct(long **array)
this one's indirectly lost
Definition: PerfMonTestManyLeaksAlg.cxx:155
PerfMonTest::ManyLeaksAlg::stillReachableFct
long * stillReachableFct(long **array)
Definition: PerfMonTestManyLeaksAlg.cxx:121
PerfMonTest::ManyLeaksAlg::m_stillReachable
long * m_stillReachable
Definition: PerfMonTestManyLeaksAlg.h:80
PerfMonTest::ManyLeaksAlg::possibleLostFct
long * possibleLostFct(long **array)
this one's possible lost
Definition: PerfMonTestManyLeaksAlg.cxx:135
PerfMonTest::ManyLeaksAlg::ATLAS_THREAD_SAFE
static long **m_pointers ATLAS_THREAD_SAFE
Definition: PerfMonTestManyLeaksAlg.h:93
PerfMonTest::ManyLeaksAlg::~ManyLeaksAlg
virtual ~ManyLeaksAlg()
Destructor:
Definition: PerfMonTestManyLeaksAlg.cxx:54
PerfMonTest::ManyLeaksAlg::m_definitelyLost
long * m_definitelyLost
Definition: PerfMonTestManyLeaksAlg.h:89
AthAlgorithm.h
PerfMonTest::ManyLeaksAlg::m_leakInInit
bool m_leakInInit
Property to setup the location of the leak, in initialize (true) or execute (false)
Definition: PerfMonTestManyLeaksAlg.h:75
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PerfMonTest::ManyLeaksAlg::m_possibleLost
long * m_possibleLost
Definition: PerfMonTestManyLeaksAlg.h:83
PerfMonTest
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.
Definition: Control/PerformanceMonitoring/PerfMonTests/src/Hit.h:7
PerfMonTest::ManyLeaksAlg::m_indirectlyLost
long * m_indirectlyLost
Definition: PerfMonTestManyLeaksAlg.h:86
PerfMonTest::ManyLeaksAlg::m_leakSize
int m_leakSize
Property to setup the size of the leak.
Definition: PerfMonTestManyLeaksAlg.h:72
AthAlgorithm
Definition: AthAlgorithm.h:47
PerfMonTest::ManyLeaksAlg::initialize
virtual StatusCode initialize()
Definition: PerfMonTestManyLeaksAlg.cxx:61
lumiFormat.array
array
Definition: lumiFormat.py:91
PerfMonTest::ManyLeaksAlg::ManyLeaksAlg
ManyLeaksAlg()
Default constructor:
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PerfMonTest::ManyLeaksAlg::leakAll
void leakAll()
this one's definitely lost
Definition: PerfMonTestManyLeaksAlg.cxx:97
PerfMonTest::ManyLeaksAlg::finalize
virtual StatusCode finalize()
Definition: PerfMonTestManyLeaksAlg.cxx:77
PerfMonTest::ManyLeaksAlg
Definition: PerfMonTestManyLeaksAlg.h:27
PerfMonTest::ManyLeaksAlg::definitelyLostFct
long * definitelyLostFct(long **array)
this one's definitely lost
Definition: PerfMonTestManyLeaksAlg.cxx:187
PerfMonTest::ManyLeaksAlg::execute
virtual StatusCode execute()
Definition: PerfMonTestManyLeaksAlg.cxx:84
checker_macros.h
Define macros for attributes used to control the static checker.