]> arthur.barton.de Git - netdata.git/blobdiff - src/common.c
added libavl for supporting balanced binary trees - this improves search performance...
[netdata.git] / src / common.c
index 6747382070cb2258ba24910efcaaff3326661ada..df85ee8fa8dc23eacb0b510e8d5ebfcaa058ae35 100755 (executable)
@@ -9,12 +9,10 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <malloc.h>
 
 
 #include "log.h"
 #include "common.h"
-#include "web_client.h"
 
 // http://stackoverflow.com/questions/7666509/hash-function-for-string
 unsigned long simple_hash(const char *name)
@@ -159,23 +157,6 @@ int savememory(const char *filename, void *mem, unsigned long size)
        return ret;
 }
 
-void log_allocations(void)
-{
-       static int mem = 0;
-
-       struct mallinfo mi;
-
-       mi = mallinfo();
-       if(mi.uordblks > mem) {
-               int clients = 0;
-               struct web_client *w;
-               for(w = web_clients; w ; w = w->next) clients++;
-
-               info("Allocated memory increased from %d to %d (increased by %d bytes). There are %d web clients connected.", mem, mi.uordblks, mi.uordblks - mem, clients);
-               mem = mi.uordblks;
-       }
-}
-
 int fd_is_valid(int fd) {
     return fcntl(fd, F_GETFD) != -1 || errno != EBADF;
 }