CMS 3D CMS Logo

ThreadAllocInfo.h
Go to the documentation of this file.
1 #ifndef PerfTools_AllocMonitor_ThreadAllocInfo_h
2 #define PerfTools_AllocMonitor_ThreadAllocInfo_h
3 // -*- C++ -*-
4 //
5 // Package: PerfTools/AllocMonitor
6 // Class : ThreadAllocInfo
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Fri, 10 May 2024 14:48:59 GMT
19 //
20 
21 // system include files
22 
23 // user include files
24 
25 // forward declarations
26 
27 namespace edm::service::moduleAlloc {
28  struct ThreadAllocInfo {
29  size_t requested_ = 0;
30  long long presentActual_ = 0;
31  size_t maxActual_ = 0;
32  long long minActual_ = 0;
33  size_t maxSingleAlloc_ = 0;
34  size_t nAllocations_ = 0;
35  size_t nDeallocations_ = 0;
36  bool active_ = false;
37 
38  void reset() {
39  requested_ = 0;
40  presentActual_ = 0;
41  maxActual_ = 0;
42  minActual_ = 0;
43  maxSingleAlloc_ = 0;
44  nAllocations_ = 0;
45  nDeallocations_ = 0;
46  active_ = true;
47  }
48 
49  void deactivate() { active_ = false; }
50  };
51 } // namespace edm::service::moduleAlloc
52 #endif