Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

memusage.h File Reference

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


Function Documentation

unsigned long memusage const char **  source = 0  ) 
 

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 103 of file memusage.C.

References memusage_mallinfo(), memusage_mstats(), and memusage_ps().

Referenced by main::main(), memusage_kB(), and memusage_MB().

00103                                             {
00104 
00105   unsigned long memtotal = 0;
00106   const char* s = "ERROR";
00107 
00108 #if CHARM_VERSION > 50911
00109   if (CmiMemoryIs(CMI_MEMORY_IS_GNU) ) memtotal = CmiMemoryUsage();
00110   s = "CmiMemoryUsage";
00111 #endif
00112 
00113   if ( ! memtotal ) { memtotal = memusage_mstats(); s = "mstats"; }
00114 
00115   if ( ! memtotal ) { memtotal = memusage_mallinfo(); s = "mallinfo"; }
00116 
00117   if ( ! memtotal ) { memtotal = memusageinit::memusage_sbrk(); s = "sbrk"; }
00118 
00119   if ( ! memtotal ) { memtotal = memusage_ps(); s = "ps"; }
00120 
00121   if ( ! memtotal ) s = "nothing";
00122 
00123   if ( source ) *source = s;
00124 
00125   return memtotal;
00126 
00127 }

double memusage_kB  )  [inline]
 

Definition at line 12 of file memusage.h.

References memusage().

00012 { return memusage() / 1024.; }

double memusage_MB  )  [inline]
 

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.; }


Variable Documentation

memusageinit memusageinitobject [static]
 

Definition at line 25 of file memusage.h.


Generated on Mon Oct 13 04:07:43 2008 for NAMD by  doxygen 1.3.9.1