summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemInformation.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-05-02 15:44:26 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-05-02 15:44:26 (GMT)
commit9c63132c3c16e9b28c59de811e32288a6bcc7e0a (patch)
tree5200587174e447a1bb725f8f57f05b6e3e1ca015 /Source/kwsys/SystemInformation.cxx
parent36cf25e6a27520b168949090bd17f70b8021f48a (diff)
downloadCMake-9c63132c3c16e9b28c59de811e32288a6bcc7e0a.zip
CMake-9c63132c3c16e9b28c59de811e32288a6bcc7e0a.tar.gz
CMake-9c63132c3c16e9b28c59de811e32288a6bcc7e0a.tar.bz2
ENH: use GlobalMemoryStatusEx as it is able to report more than 2gigs
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r--Source/kwsys/SystemInformation.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 5437a1f..e4a4564 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -2228,13 +2228,13 @@ int SystemInformationImplementation::QueryMemory()
#ifdef __CYGWIN__
return 0;
#elif _WIN32
- MEMORYSTATUS ms;
- GlobalMemoryStatus(&ms);
+ MEMORYSTATUSEX ms;
+ GlobalMemoryStatusEx(&ms);
- unsigned long tv = ms.dwTotalVirtual;
- unsigned long tp = ms.dwTotalPhys;
- unsigned long av = ms.dwAvailVirtual;
- unsigned long ap = ms.dwAvailPhys;
+ unsigned long tv = ms.ullTotalVirtual;
+ unsigned long tp = ms.ullTotalPhys;
+ unsigned long av = ms.ullAvailVirtual;
+ unsigned long ap = ms.ullAvailPhys;
this->TotalVirtualMemory = tv>>10>>10;
this->TotalPhysicalMemory = tp>>10>>10;
this->AvailableVirtualMemory = av>>10>>10;