ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthDevice
AthDeviceComps
src
DebugMemoryResourceTool.cxx
Go to the documentation of this file.
1
//
2
// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
//
4
5
// Local include(s).
6
#include "
DebugMemoryResourceTool.h
"
7
8
// VecMem include(s).
9
#include <vecmem/memory/debug_memory_resource.hpp>
10
11
namespace
AthDevice
{
12
13
StatusCode
DebugMemoryResourceTool::initialize
() {
14
15
// Retrieve the upstream tool.
16
ATH_CHECK
(
m_mrTool
.retrieve());
17
18
// Construct the debug resource around it.
19
m_mr
= std::make_unique<vecmem::debug_memory_resource>(
m_mrTool
->mr());
20
21
// Return gracefully.
22
return
StatusCode::SUCCESS;
23
}
24
25
std::pmr::memory_resource&
DebugMemoryResourceTool::mr
()
const
{
26
27
assert(
m_mr
);
28
return
*
m_mr
;
29
}
30
31
}
// namespace AthDevice
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
DebugMemoryResourceTool.h
AthDevice::DebugMemoryResourceTool::initialize
virtual StatusCode initialize() override
Initialize the tool.
Definition
DebugMemoryResourceTool.cxx:13
AthDevice::DebugMemoryResourceTool::mr
virtual std::pmr::memory_resource & mr() const override
Get the provided std::pmr::memory_resource object.
Definition
DebugMemoryResourceTool.cxx:25
AthDevice::DebugMemoryResourceTool::m_mr
std::unique_ptr< std::pmr::memory_resource > m_mr
The memory resource that this tool uses.
Definition
DebugMemoryResourceTool.h:45
AthDevice::DebugMemoryResourceTool::m_mrTool
ToolHandle< IMemoryResourceTool > m_mrTool
Underlying memory resource to use for allocations.
Definition
DebugMemoryResourceTool.h:51
AthDevice
Definition
BinaryPageMemoryResourceSvc.cxx:15
Generated on
for ATLAS Offline Software by
1.16.1