Lines 1-5
Link Here
|
1 |
--- globalslinux.cpp.orig Tue Nov 30 05:09:50 2004 |
1 |
--- globalslinux.cpp.orig 2020-01-09 04:20:25 UTC |
2 |
+++ globalslinux.cpp Mon Jul 4 11:13:18 2005 |
2 |
+++ globalslinux.cpp |
3 |
@@ -7,6 +7,12 @@ |
3 |
@@ -7,6 +7,12 @@ |
4 |
#include <errno.h> |
4 |
#include <errno.h> |
5 |
#include <stdio.h> |
5 |
#include <stdio.h> |
Lines 13-19
Link Here
|
13 |
|
13 |
|
14 |
const int ONE_MB = 1000000; |
14 |
const int ONE_MB = 1000000; |
15 |
const int MEM_WARNING_THRESHOLD = 20*ONE_MB; |
15 |
const int MEM_WARNING_THRESHOLD = 20*ONE_MB; |
16 |
@@ -39,6 +45,34 @@ |
16 |
@@ -39,6 +45,34 @@ const char *GetCmdLine() |
17 |
return szCmdLine; |
17 |
return szCmdLine; |
18 |
} |
18 |
} |
19 |
|
19 |
|
Lines 48-54
Link Here
|
48 |
double GetMemUseMB() |
48 |
double GetMemUseMB() |
49 |
{ |
49 |
{ |
50 |
static char statm[64]; |
50 |
static char statm[64]; |
51 |
@@ -83,6 +117,7 @@ |
51 |
@@ -74,6 +108,7 @@ double GetMemUseMB() |
52 |
|
52 |
|
53 |
return ((double) Pages * (double) PageSize)/1e6; |
53 |
return ((double) Pages * (double) PageSize)/1e6; |
54 |
} |
54 |
} |
Lines 56-62
Link Here
|
56 |
|
56 |
|
57 |
void SaveCmdLine(int argc, char *argv[]) |
57 |
void SaveCmdLine(int argc, char *argv[]) |
58 |
{ |
58 |
{ |
59 |
@@ -118,6 +153,28 @@ |
59 |
@@ -109,6 +144,28 @@ void CheckMemUse() |
60 |
dPeakMemUseMB = dMB; |
60 |
dPeakMemUseMB = dMB; |
61 |
} |
61 |
} |
62 |
|
62 |
|
Lines 85-91
Link Here
|
85 |
double GetRAMSizeMB() |
85 |
double GetRAMSizeMB() |
86 |
{ |
86 |
{ |
87 |
const double DEFAULT_RAM = 500; |
87 |
const double DEFAULT_RAM = 500; |
88 |
@@ -168,5 +225,6 @@ |
88 |
@@ -159,5 +216,6 @@ double GetRAMSizeMB() |
89 |
int Bytes = atoi(pMem+9)*1000; |
89 |
int Bytes = atoi(pMem+9)*1000; |
90 |
return ((double) Bytes)/1e6; |
90 |
return ((double) Bytes)/1e6; |
91 |
} |
91 |
} |