ATLAS Offline Software
Loading...
Searching...
No Matches
DebugMemoryResourceTool.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3//
4#ifndef ATHDEVICECOMPS_DEBUGMEMORYRESOURCETOOL_H
5#define ATHDEVICECOMPS_DEBUGMEMORYRESOURCETOOL_H
6
7// Framework include(s).
9#include "GaudiKernel/ToolHandle.h"
10
11// AthDevice include(s).
13
14namespace AthDevice {
15
21 : public extends<AthAlgTool, AthDevice::IMemoryResourceTool> {
22
23 public:
24 // Inherit the base class's constructor(s).
25 using extends::extends;
26
29
31 virtual StatusCode initialize() override;
32
34
37
39 virtual std::pmr::memory_resource& mr() const override;
40
42
43 private:
45 std::unique_ptr<std::pmr::memory_resource> m_mr;
46
49
51 ToolHandle<IMemoryResourceTool> m_mrTool{
52 this, "MRTool", "", "Memory resource tool to use for allocations"};
53
55
56}; // class DebugMemoryResourceTool
57
58} // namespace AthDevice
59
60#endif // ATHDEVICECOMPS_DEBUGMEMORYRESOURCETOOL_H
Tool providing debugging functionality for memory resources.
virtual StatusCode initialize() override
Initialize the tool.
virtual std::pmr::memory_resource & mr() const override
Get the provided std::pmr::memory_resource object.
std::unique_ptr< std::pmr::memory_resource > m_mr
The memory resource that this tool uses.
ToolHandle< IMemoryResourceTool > m_mrTool
Underlying memory resource to use for allocations.