Browse Source

Merge topic 'update-kwsys'

9ddbf4c6e6 Merge branch 'upstream-KWSys' into update-kwsys
8372c05472 KWSys 2019-02-05 (65802a20)

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2918
Brad King 7 years ago
parent
commit
f47d980f73
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/kwsys/SystemInformation.cxx

+ 2 - 1
Source/kwsys/SystemInformation.cxx

@@ -4424,7 +4424,8 @@ bool SystemInformationImplementation::ParseSysCtl()
                       &count) == KERN_SUCCESS) {
     len = sizeof(value);
     err = sysctlbyname("hw.pagesize", &value, &len, KWSYS_NULLPTR, 0);
-    int64_t available_memory = vmstat.free_count * value;
+    int64_t available_memory =
+      (vmstat.free_count + vmstat.inactive_count) * value;
     this->AvailablePhysicalMemory =
       static_cast<size_t>(available_memory / 1048576);
   }