From 9c63132c3c16e9b28c59de811e32288a6bcc7e0a Mon Sep 17 00:00:00 2001
From: Bill Hoffman <bill.hoffman@kitware.com>
Date: Fri, 2 May 2008 11:44:26 -0400
Subject: ENH: use GlobalMemoryStatusEx as it is able to report more than 2gigs

---
 Source/kwsys/SystemInformation.cxx | 12 ++++++------
 1 file 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;
-- 
cgit v0.12