[Cmake-commits] CMake branch, master, updated. 93458332720dc0c237360d8350c4d16b5d8e68c9

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 26 14:20:03 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  93458332720dc0c237360d8350c4d16b5d8e68c9 (commit)
      from  e750761857fa2e35ad9630b13606570c561ae829 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93458332720dc0c237360d8350c4d16b5d8e68c9
commit 93458332720dc0c237360d8350c4d16b5d8e68c9
Author: Dave Partyka <dave.partyka at kitware.com>
Date:   Fri Mar 26 14:18:24 2010 -0400

    BUG: Commit a fix from Rusty to address incorrectly reported memory queries.

diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 7041d38..936c1f7 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -2395,11 +2395,13 @@ int SystemInformationImplementation::QueryMemory()
 #elif _WIN32
 #if  _MSC_VER < 1300
   MEMORYSTATUS ms;
+  unsigned long tv, tp, av, ap;
   ms.dwLength = sizeof(ms);
   GlobalMemoryStatus(&ms);
-#define MEM_VAL(value) dw##value
+  #define MEM_VAL(value) dw##value
 #else
   MEMORYSTATUSEX ms;
+  DWORDLONG tv, tp, av, ap;
   ms.dwLength = sizeof(ms);
   if (0 == GlobalMemoryStatusEx(&ms))
   {
@@ -2407,10 +2409,10 @@ int SystemInformationImplementation::QueryMemory()
   }
 #define MEM_VAL(value) ull##value
 #endif
-  unsigned long tv = ms.MEM_VAL(TotalVirtual);
-  unsigned long tp = ms.MEM_VAL(TotalPhys);
-  unsigned long av = ms.MEM_VAL(AvailVirtual);
-  unsigned long ap = ms.MEM_VAL(AvailPhys);
+  tv = ms.MEM_VAL(TotalVirtual);
+  tp = ms.MEM_VAL(TotalPhys);
+  av = ms.MEM_VAL(AvailVirtual);
+  ap = ms.MEM_VAL(AvailPhys);
   this->TotalVirtualMemory = tv>>10>>10;
   this->TotalPhysicalMemory = tp>>10>>10;
   this->AvailableVirtualMemory = av>>10>>10;

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/SystemInformation.cxx |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list