summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2017-03-27 16:20:40 -0400
committerJonathan Reams <jbreams@mongodb.com>2017-04-07 11:25:19 -0400
commit0072cd5d0c15e8721c3055928ee5b08709097350 (patch)
treeb22e8a6e2592d36e8756eda6c62a07f67ac57f1f /src
parentc53363894310c144aefd06ce323d348735789601 (diff)
downloadmongo-0072cd5d0c15e8721c3055928ee5b08709097350.tar.gz
SERVER-27687 Fix cpuAddrSize detection on Linux for hostInfo command
(cherry picked from commit d2211f33b794dc638bec61a14ae9ba68e76b8946)
Diffstat (limited to 'src')
-rw-r--r--src/mongo/util/processinfo_linux.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index ffe17d9805c..910015215e0 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -479,7 +479,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
osName = distroName;
osVersion = distroVersion;
memSize = LinuxSysHelper::getSystemMemorySize();
- addrSize = (string(unameData.machine).find("x86_64") != string::npos ? 64 : 32);
+ addrSize = sizeof(void*) * CHAR_BIT;
numCores = cpuCount;
pageSize = static_cast<unsigned long long>(sysconf(_SC_PAGESIZE));
cpuArch = unameData.machine;