+#include <sys/time.h>
+#include <sys/resource.h>
+
#ifndef NETDATA_COMMON_H
#define NETDATA_COMMON_H 1
extern pid_t gettid(void);
+/* fix for alpine linux */
+#ifndef RUSAGE_THREAD
+#ifdef RUSAGE_CHILDREN
+#define RUSAGE_THREAD RUSAGE_CHILDREN
+#endif
+#endif
+
#endif /* NETDATA_COMMON_H */
int listen_fd = -1;
int listen_port = LISTEN_PORT;
+#ifdef NETDATA_INTERNAL_CHECKS
static void log_allocations(void)
{
static int mem = 0;
mem = mi.uordblks;
}
}
+#endif
int create_listen_socket4(int port, int listen_backlog)
{
debug(D_WEB_CLIENT, "%llu: Removing client.", w->id);
// pthread_join(w->thread, NULL);
w = web_client_free(w);
+#ifdef NETDATA_INTERNAL_CHECKS
log_allocations();
+#endif
}
}
}