summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
authorMatt Cotter <matt.cotter@mongodb.com>2016-06-02 11:56:46 -0400
committerMatt Cotter <matt.cotter@mongodb.com>2016-06-03 12:58:15 -0400
commit8900002b731358b0beedadb2ceb4e3156de402b6 (patch)
tree0a4c746f7fbf7ffef739a48f0318142f2923ceb3 /src/mongo/util
parent910e782aa5d8329c5e8b2531cf0116052e8a187e (diff)
downloadmongo-8900002b731358b0beedadb2ceb4e3156de402b6.tar.gz
SERVER-24363 cast mallinfo members to long long before adding
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/processinfo_linux.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index c831e135f0d..56c5e626b5d 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -451,7 +451,8 @@ void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
struct mallinfo malloc_info =
mallinfo(); // structure has same name as function that returns it. (see malloc.h)
info.append("heap_usage_bytes",
- malloc_info.uordblks /*main arena*/ + malloc_info.hblkhd /*mmap blocks*/);
+ static_cast<long long>(malloc_info.uordblks) /*main arena*/ +
+ static_cast<long long>(malloc_info.hblkhd) /*mmap blocks*/);
// docs claim hblkhd is included in uordblks but it isn't
LinuxProc p(_pid);