13#ifndef CD_MEMORYREPORT_H
14#define CD_MEMORYREPORT_H
26#include <CD_NamespaceHeader.H>
136#include <CD_NamespaceFooter.H>
Process-wide accounting of the memory held by particle data.
Namespace containing utility functions for reporting memory usage in various formats.
Definition CD_MemoryReport.H:31
void getResidentSetSize(Real &a_currentRSS, Real &a_peakRSS)
Get the calling process' current and peak resident set size.
Definition CD_MemoryReport.cpp:134
void getMaxMinResidentSetSize(Real &a_maxCurrent, Real &a_minCurrent, Real &a_maxPeak, Real &a_minPeak)
Get the global maximum and minimum resident set size over all ranks.
Definition CD_MemoryReport.cpp:170
std::string bytesAsMB(const long long a_bytes)
Format a byte count as megabytes for a report line.
Definition CD_MemoryReport.cpp:186
void getMemoryUsage(Vector< Real > &a_peak, Vector< Real > &a_unfreed)
Get peak and unfreed memory usage per rank.
Definition CD_MemoryReport.cpp:92
void getMaxMinMemoryUsage()
Print the global maximum and minimum memory usage. This includes peak memory and unfreed memory.
Definition CD_MemoryReport.cpp:32
void printMemoryTable(std::ostream &a_out, const std::string &a_indent)
Write the full memory report as a table.
Definition CD_MemoryReport.cpp:204