diff options
author | Matt Cotter <matt.cotter@mongodb.com> | 2016-06-02 11:56:46 -0400 |
---|---|---|
committer | Matt Cotter <matt.cotter@mongodb.com> | 2016-06-03 12:58:15 -0400 |
commit | 8900002b731358b0beedadb2ceb4e3156de402b6 (patch) | |
tree | 0a4c746f7fbf7ffef739a48f0318142f2923ceb3 /src/mongo/util | |
parent | 910e782aa5d8329c5e8b2531cf0116052e8a187e (diff) | |
download | mongo-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.cpp | 3 |
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); |