--- orig/mongodb-src-r3.0.2/src/mongo/util/processinfo_linux2.cpp +++ mongodb-src-r3.0.2/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" @@ -314,6 +318,7 @@ paths.push_back( "/etc/slackware-version" ); paths.push_back( "/etc/centos-release" ); paths.push_back( "/etc/os-release" ); + paths.push_back( "/etc/alpine-release" ); for ( i = paths.begin(); i != paths.end(); ++i ) { // for each path @@ -398,8 +403,11 @@ 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) + // info.append("heap_usage_bytes", malloc_info.uordblks/*main arena*/ + malloc_info.hblkhd/*mmap blocks*/); + + // 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);