#include <memusage.h>
Public Member Functions | |
| memusageinit () | |
Friends | |
| unsigned long | memusage (const char **source) |
|
|
Definition at line 20 of file memusage.C. 00020 {
00021 if ( initialized == 0 ) {
00022 sbrkval = (unsigned long) sbrk(0);
00023 initialized = 1;
00024 }
00025 }
|
|
|
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. 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 }
|
1.3.9.1