Changeset 46319 in vbox for trunk/src/VBox/Main/src-server/win
- Timestamp:
- May 30, 2013 9:22:00 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/PerformanceWin.cpp
r44529 r46319 89 89 PFNNQSI mpfnNtQuerySystemInformation; 90 90 HMODULE mhNtDll; 91 92 ULONG totalRAM; 91 93 }; 92 94 … … 119 121 } 120 122 } 123 124 uint64_t cb; 125 int rc = RTSystemQueryTotalRam(&cb); 126 if (RT_FAILURE(rc)) 127 totalRAM = 0; 128 else 129 totalRAM = (ULONG)(cb / 1024); 121 130 } 122 131 … … 303 312 { 304 313 uint64_t cb; 305 int rc = RTSystemQueryTotalRam(&cb);314 rc = RTSystemQueryAvailableRam(&cb); 306 315 if (RT_SUCCESS(rc)) 307 316 { 308 *total = (ULONG)(cb / 1024); 309 rc = RTSystemQueryAvailableRam(&cb); 310 if (RT_SUCCESS(rc)) 311 { 312 *available = (ULONG)(cb / 1024); 313 *used = *total - *available; 314 } 317 *total = totalRAM; 318 *available = (ULONG)(cb / 1024); 319 *used = *total - *available; 315 320 } 316 321 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.