Chombo + EB + MF  3.2
Macros | Functions
memusage.H File Reference
#include "REAL.H"
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"
Include dependency graph for memusage.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _MEMUSAGE_H_
 

Functions

void print_memory_line (const char *)
 
void print_memory_line (void)
 
void getPeakMemoryFromOS (Real &VmPeak, Real &VmHWM)
 
void getMemoryUsageFromOS (Real &residentSetSize, Real &size)
 
Real get_memory_usage_from_OS (void)
 
void getMemoryUsageSize (unsigned int &residentSize, unsigned int &size)
 
unsigned int getMemorySize (void)
 
void gather_memory_from_procs (Real end_memory, Real &avg_memory, Real &min_memory, Real &max_memory)
 
void reduce_print_avg_min_max (const char *s, Real value)
 
int reduce_avg_min_max (Real value, Real &avg, Real &min, Real &max)
 
int reduce_avg_min_max_loc (Real value, Real &avg, Real &min, Real &max, int &minloc, int &maxloc)
 

Macro Definition Documentation

◆ _MEMUSAGE_H_

#define _MEMUSAGE_H_

Function Documentation

◆ print_memory_line() [1/2]

void print_memory_line ( const char *  )

Print a line of memory information to pout() with a string label

◆ print_memory_line() [2/2]

void print_memory_line ( void  )

Print a line of memory information to pout()

◆ getPeakMemoryFromOS()

void getPeakMemoryFromOS ( Real VmPeak,
Real VmHWM 
)

If Linux, uses /proc/self/status to find the peak residentSetSize of process and the peak VM size. Units should be MB. Returns 0 if not Linux.

◆ getMemoryUsageFromOS()

void getMemoryUsageFromOS ( Real residentSetSize,
Real size 
)

Return the residentSetSize of process from either /proc/self/statm or getrusage(RUSAGE_SELF, &rus) Units should be MB. If /proc/self/statm is used (Linux only), then VM size is also returned.

◆ get_memory_usage_from_OS()

Real get_memory_usage_from_OS ( void  )

Maintain backward compatibility in code. Return the residentSetSize of process from either /proc/self/statm or getrusage(RUSAGE_SELF, &rus) Units should be MB.

◆ getMemoryUsageSize()

void getMemoryUsageSize ( unsigned int &  residentSize,
unsigned int &  size 
)

verison that does not convert things to floating-point values

Referenced by getMemorySize().

◆ getMemorySize()

unsigned int getMemorySize ( void  )
inline

◆ gather_memory_from_procs()

void gather_memory_from_procs ( Real  end_memory,
Real avg_memory,
Real min_memory,
Real max_memory 
)

Referenced by getMemorySize().

◆ reduce_print_avg_min_max()

void reduce_print_avg_min_max ( const char *  s,
Real  value 
)

Referenced by getMemorySize().

◆ reduce_avg_min_max()

int reduce_avg_min_max ( Real  value,
Real avg,
Real min,
Real max 
)

Referenced by getMemorySize().

◆ reduce_avg_min_max_loc()

int reduce_avg_min_max_loc ( Real  value,
Real avg,
Real min,
Real max,
int &  minloc,
int &  maxloc 
)

Referenced by getMemorySize().