memstats.c File Reference

This program reads a log file and prints the memory allocation summed up. More...

#include "config.h"
#include "util/log.h"
#include "util/rbtree.h"
#include "util/locks.h"
#include "util/fptr_wlist.h"
#include <sys/stat.h>

Data Structures

struct  codeline
 The allocation statistics block. More...

Functions

static void usage ()
 print usage and exit
static int match (char *line)
 match logfile line to see if it needs accounting processing
static struct codelineget_codeline (rbtree_t *tree, char *key, char *func)
 find or alloc codeline in tree
static void read_malloc_stat (char *line, rbtree_t *tree)
 read up the malloc stats
static void read_calloc_stat (char *line, rbtree_t *tree)
 read up the calloc stats
static off_t get_file_size (const char *fname)
 get size of file
static void readfile (rbtree_t *tree, const char *fname)
 read the logfile
static void printstats (rbtree_t *tree)
 print memory stats
int main (int argc, const char *argv[])
 main program


Detailed Description

This program reads a log file and prints the memory allocation summed up.


Generated on Sun Sep 21 16:23:29 2008 for unbound by  doxygen 1.5.6