summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-05 12:47:29 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-05 12:49:07 (GMT)
commitf47d980f73a065485bb7090a850f2ac4044c2dfd (patch)
treed507f8ef7e37cdb292abe1406cbadfe645937080 /Source
parentab01ce91eee2ff8b00d56a5044a54404d4d3f49c (diff)
parent9ddbf4c6e65b17b76dd6ccca72c5b3a0b7cbb1ad (diff)
downloadCMake-f47d980f73a065485bb7090a850f2ac4044c2dfd.zip
CMake-f47d980f73a065485bb7090a850f2ac4044c2dfd.tar.gz
CMake-f47d980f73a065485bb7090a850f2ac4044c2dfd.tar.bz2
Merge topic 'update-kwsys'
9ddbf4c6e6 Merge branch 'upstream-KWSys' into update-kwsys 8372c05472 KWSys 2019-02-05 (65802a20) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2918
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/SystemInformation.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 6c12355..f323efc 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/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);
}