-
/*
* $Id$
*
}
void *
-
-LeakFinder::add
-(void *p, const char *file, int line)
+LeakFinder::addSome(void *p, const char *file, int line)
{
assert(hash_lookup(table, p) == NULL);
LeakFinderPtr *c = new LeakFinderPtr(p, file, line);
}
void *
-LeakFinder::free(void *p, const char *file, int line)
+LeakFinder::freeSome(void *p, const char *file, int line)
{
assert(p);
LeakFinderPtr *c = (LeakFinderPtr *) hash_lookup(table, p);
-
-
-
#ifndef SQUID_LEAKFINDER_H
#define SQUID_LEAKFINDER_H
+#include "config.h"
+
#if USE_LEAKFINDER
-#define leakAdd(p,l) if (l) l->add(p,__FILE__,__LINE__)
+
+#include "hash.h"
+
+#define leakAdd(p,l) if (l) l->addSome(p,__FILE__,__LINE__)
#define leakTouch(p,l) if (l) l->touch(p,__FILE__,__LINE__)
-#define leakFree(p,l) if (l) l->free(p,__FILE__,__LINE__)
+#define leakFree(p,l) if (l) l->freeSome(p,__FILE__,__LINE__)
class LeakFinderPtr : public hash_link
{
LeakFinder();
~LeakFinder();
- void *add
- (void *, const char *, const int);
+ void *addSome(void *, const char *, const int);
void *touch(void *, const char *, const int);
- void *free(void *, const char *, const int);
+ void *freeSome(void *, const char *, const int);
void dump();