00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _MEMUSAGE_H_
00012 #define _MEMUSAGE_H_
00013
00014 #include "REAL.H"
00015 #include "BaseNamespaceHeader.H"
00016
00018
00021 void print_memory_line(const char *);
00022
00024
00027 void print_memory_line(void);
00028
00029
00031
00036 void getPeakMemoryFromOS(Real& VmPeak, Real& VmHWM);
00037
00039
00044 void getMemoryUsageFromOS(Real& residentSetSize, Real& size);
00045
00047
00052 Real get_memory_usage_from_OS(void);
00053
00055
00057 void gather_memory_from_procs(Real end_memory,
00058 Real &avg_memory,
00059 Real &min_memory,
00060 Real &max_memory);
00061
00062 void reduce_print_avg_min_max(const char* s, Real value);
00063 int reduce_avg_min_max(Real value, Real &avg, Real &min, Real &max);
00064 int reduce_avg_min_max_loc(Real value, Real& avg, Real& min, Real& max, int& minloc, int& maxloc);
00065
00066 #include "BaseNamespaceFooter.H"
00067
00068 #endif