CMS 3D CMS Logo

List of all members | Static Public Member Functions
memory_usage Class Reference

#include <memory_usage.h>

Static Public Member Functions

static uint64_t allocated ()
 
static uint64_t deallocated ()
 
static bool is_available ()
 
static uint64_t peak ()
 
static void reset_peak ()
 

Detailed Description

Definition at line 6 of file memory_usage.h.

Member Function Documentation

◆ allocated()

uint64_t memory_usage::allocated ( )
static

◆ deallocated()

uint64_t memory_usage::deallocated ( )
static

◆ is_available()

bool memory_usage::is_available ( )
static

Definition at line 84 of file memory_usage.cc.

Referenced by FastTimerService::PlotsPerElement::book(), and FastTimerService::PlotsPerPath::book().

84 { return have_jemalloc_and_stats; }

◆ peak()

uint64_t memory_usage::peak ( )
static

Definition at line 90 of file memory_usage.cc.

References findQualityFiles::size.

90  {
91  uint64_t peak = 0;
92  size_t size = sizeof(uint64_t);
93  if (have_jemalloc_and_peak)
94  mallctlbymib(mib_peak_read, 3, &peak, &size, nullptr, 0);
95  return peak;
96 }
size
Write out results.
unsigned long long uint64_t
Definition: Time.h:13
static uint64_t peak()
Definition: memory_usage.cc:90

◆ reset_peak()

void memory_usage::reset_peak ( )
static

Definition at line 98 of file memory_usage.cc.

98  {
99  if (have_jemalloc_and_peak)
100  mallctlbymib(mib_peak_reset, 3, nullptr, nullptr, nullptr, 0);
101 }