summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2010-01-15 17:16:17 -0500
committerMathias Stearn <mathias@10gen.com>2010-01-19 22:06:41 -0500
commit04aabf6194249e57811dc873c6d458d44f43e01a (patch)
treee26d1d9003cc80cef2ac0be86fa00a9c10d9b1af
parent5a2da6b86f6c4e7ee0a18b3f392f83a579d67094 (diff)
downloadmongo-04aabf6194249e57811dc873c6d458d44f43e01a.tar.gz
elim warning on windows
(cherry picked from commit 95ba1b843ec69b2fba574b2a502f3df7efe33d92)
-rw-r--r--util/processinfo_win32.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/processinfo_win32.cpp b/util/processinfo_win32.cpp
index 7148cf3fba1..111ee069b4b 100644
--- a/util/processinfo_win32.cpp
+++ b/util/processinfo_win32.cpp
@@ -47,9 +47,11 @@ namespace mongo {
int ProcessInfo::getVirtualMemorySize(){
MEMORYSTATUSEX mse;
- mse.dwLength = sizeof(mse);
+ mse.dwLength = sizeof(mse);
assert( GlobalMemoryStatusEx( &mse ) );
- return (mse.ullTotalVirtual - mse.ullAvailVirtual) / (1024 * 1024) ;
+ DWORDLONG x = (mse.ullTotalVirtual - mse.ullAvailVirtual) / (1024 * 1024) ;
+ assert( x <= 0x7fffffff );
+ return (int) x;
}
int ProcessInfo::getResidentSize(){