Go to the source code of this file.
Classes | |
| class | memusageinit |
Functions | |
| unsigned long | memusage (const char **source=0) |
| double | memusage_kB () |
| double | memusage_MB () |
Variables | |
| memusageinit | memusageinitobject |
|
|
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved. Definition at line 121 of file memusage.C. References memusage_mallinfo(), memusage_mstats(), memusage_proc_self_stat(), and memusage_ps(). Referenced by main::main(), memusage_kB(), and memusage_MB(). 00121 {
00122
00123 unsigned long memtotal = 0;
00124 const char* s = "ERROR";
00125
00126 if (CmiMemoryIs(CMI_MEMORY_IS_GNU) ) {
00127 memtotal = CmiMemoryUsage(); s = "CmiMemoryUsage";
00128 }
00129
00130 #if defined(WIN32) && !defined(__CYGWIN__) && CHARM_VERSION > 60102
00131 if ( ! memtotal ) {
00132 memtotal = CmiMemoryUsage(); s = "GetProcessMemoryInfo";
00133 }
00134 #endif
00135
00136 if ( ! memtotal ) {
00137 memtotal = memusage_proc_self_stat(); s = "/proc/self/stat";
00138 }
00139
00140 if ( ! memtotal ) { memtotal = memusage_mstats(); s = "mstats"; }
00141
00142 if ( ! memtotal ) { memtotal = memusage_mallinfo(); s = "mallinfo"; }
00143
00144 if ( ! memtotal ) { memtotal = memusageinit::memusage_sbrk(); s = "sbrk"; }
00145
00146 if ( ! memtotal ) { memtotal = memusage_ps(); s = "ps"; }
00147
00148 if ( ! memtotal ) s = "nothing";
00149
00150 if ( source ) *source = s;
00151
00152 return memtotal;
00153
00154 }
|
|
|
Definition at line 12 of file memusage.h. References memusage(). 00012 { return memusage() / 1024.; }
|
|
|
Definition at line 13 of file memusage.h. References memusage(). Referenced by BackEnd::exit(), main::main(), Controller::printEnergies(), Controller::printTiming(), Node::run(), and Node::startup(). 00013 { return memusage() / 1048576.; }
|
|
|
Definition at line 25 of file memusage.h. |
1.3.9.1