blob: bf1aba081a61e735ba94ac8a48f6f408e6de78f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- 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 <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
-#include <gnu/libc-version.h>
+#ifdef __GLIBC__
+# include <gnu/libc-version.h>
+#else
+# define gnu_get_libc_version(x) "unknown"
+#endif
#include <sys/utsname.h>
#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);
|