ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PerformanceMonitoring
PerfMonTests
src
PerfMonTestManyLeaksAlg.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2025 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
21
#include "
AthenaBaseComps/AthAlgorithm.h
"
22
#include "
CxxUtils/checker_macros.h
"
23
24
namespace
PerfMonTest
{
25
26
class
ManyLeaksAlg
:
public
AthAlgorithm
27
{
28
public
:
30
using
AthAlgorithm::AthAlgorithm
;
31
32
// Athena algorithm's Hooks
33
virtual
StatusCode
initialize
()
override
;
34
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
35
36
private
:
37
38
long
*
stillReachableFct
(
long
** array);
39
41
long
*
possibleLostFct
(
long
** array);
42
44
long
*
indirectlyLostFct
(
long
** array);
45
47
long
*
definitelyLostFct
(
long
** array);
48
50
void
leakAll
();
51
53
Gaudi::Property<int>
m_leakSize
{
this
,
"LeakSize"
, 10,
"Number of longs to be leaked just once"
};
54
56
Gaudi::Property<bool>
m_leakInInit
{
this
,
"LeakInInit"
,
false
,
"Where it will leak: initialize or execute(default)"
};
57
58
private
:
59
60
// this one's still reachable
61
long
*
m_stillReachable
{};
62
63
// this one's possible lost
64
long
*
m_possibleLost
{};
65
66
// this one's indirectly lost
67
long
*
m_indirectlyLost
{};
68
69
// this one's definitely lost
70
long
*
m_definitelyLost
{};
71
72
// we still need to reference some pointers,
73
// otherwise vagrind labels everything definitely lost
74
static
long
**m_pointers
ATLAS_THREAD_SAFE
;
75
};
76
77
}
//> end namespace PerfMonTest
78
79
#endif
//> PERFMONTESTS_PERFMONTESTMANYLEAKSALG_H
AthAlgorithm.h
checker_macros.h
Define macros for attributes used to control the static checker.
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
PerfMonTest::ManyLeaksAlg
Definition
PerfMonTestManyLeaksAlg.h:27
PerfMonTest::ManyLeaksAlg::ATLAS_THREAD_SAFE
static long **m_pointers ATLAS_THREAD_SAFE
Definition
PerfMonTestManyLeaksAlg.h:74
PerfMonTest::ManyLeaksAlg::stillReachableFct
long * stillReachableFct(long **array)
Definition
PerfMonTestManyLeaksAlg.cxx:79
PerfMonTest::ManyLeaksAlg::leakAll
void leakAll()
this one's definitely lost
Definition
PerfMonTestManyLeaksAlg.cxx:55
PerfMonTest::ManyLeaksAlg::m_leakSize
Gaudi::Property< int > m_leakSize
Property to setup the size of the leak.
Definition
PerfMonTestManyLeaksAlg.h:53
PerfMonTest::ManyLeaksAlg::m_definitelyLost
long * m_definitelyLost
Definition
PerfMonTestManyLeaksAlg.h:70
PerfMonTest::ManyLeaksAlg::possibleLostFct
long * possibleLostFct(long **array)
this one's possible lost
Definition
PerfMonTestManyLeaksAlg.cxx:93
PerfMonTest::ManyLeaksAlg::m_leakInInit
Gaudi::Property< bool > m_leakInInit
Property to setup the location of the leak, in initialize (true) or execute (false).
Definition
PerfMonTestManyLeaksAlg.h:56
PerfMonTest::ManyLeaksAlg::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
PerfMonTestManyLeaksAlg.cxx:42
PerfMonTest::ManyLeaksAlg::m_possibleLost
long * m_possibleLost
Definition
PerfMonTestManyLeaksAlg.h:64
PerfMonTest::ManyLeaksAlg::indirectlyLostFct
long * indirectlyLostFct(long **array)
this one's indirectly lost
Definition
PerfMonTestManyLeaksAlg.cxx:113
PerfMonTest::ManyLeaksAlg::definitelyLostFct
long * definitelyLostFct(long **array)
this one's definitely lost
Definition
PerfMonTestManyLeaksAlg.cxx:145
PerfMonTest::ManyLeaksAlg::m_stillReachable
long * m_stillReachable
Definition
PerfMonTestManyLeaksAlg.h:61
PerfMonTest::ManyLeaksAlg::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor:
Definition
AthAlgorithm.cxx:10
PerfMonTest::ManyLeaksAlg::m_indirectlyLost
long * m_indirectlyLost
Definition
PerfMonTestManyLeaksAlg.h:67
PerfMonTest::ManyLeaksAlg::initialize
virtual StatusCode initialize() override
Definition
PerfMonTestManyLeaksAlg.cxx:26
PerfMonTest
PerfMonTestPolyVectorAlg.h Example for the memory optimization tutorial.
Definition
Control/PerformanceMonitoring/PerfMonTests/src/Hit.h:7
Generated on
for ATLAS Offline Software by
1.17.0