diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp index d1ed23a..0c1011e 100644 --- a/src/mongo/util/processinfo_linux2.cpp +++ b/src/mongo/util/processinfo_linux2.cpp @@ -335,6 +335,7 @@ public: paths.push_back("/etc/debian_release"); paths.push_back("/etc/slackware-version"); paths.push_back("/etc/centos-release"); + paths.push_back("/etc/alpine-release"); paths.push_back("/etc/os-release"); for (i = paths.begin(); i != paths.end(); ++i) { @@ -421,10 +422,10 @@ double ProcessInfo::getSystemMemoryPressurePercentage() { void ProcessInfo::getExtraInfo(BSONObjBuilder& info) { // [dm] i don't think mallinfo works. (64 bit.) ?? - 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*/); + //struct mallinfo malloc_info = + // mallinfo(); // structure has same name as function that returns it. (see malloc.h) + // TODO: Fix for TC_malloc instance().getStats() + info.append("heap_usage_bytes", 0); // docs claim hblkhd is included in uordblks but it isn't LinuxProc p(_pid); diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp index 0c1011e..755a2cc 100644 --- a/src/mongo/util/processinfo_linux2.cpp +++ b/src/mongo/util/processinfo_linux2.cpp @@ -34,7 +34,11 @@ #include #include #include -#include +#ifdef __GLIBC__ +# include +#else +# define gnu_get_libc_version(x) "unknown" +#endif #include #include "processinfo.h"