From: wessels <> Date: Thu, 24 Nov 2005 06:38:56 +0000 (+0000) Subject: It seems that LeakFinder.h is missing in your commit. X-Git-Tag: SQUID_3_0_PRE4~494 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82f27590e100a84381735e13a17e6a45ad181549;p=thirdparty%2Fsquid.git It seems that LeakFinder.h is missing in your commit. Duane: after any commit it would be better if you check if squid builds correctly. Regards Guido --- diff --git a/src/LeakFinder.h b/src/LeakFinder.h new file mode 100644 index 0000000000..dfb2ae8423 --- /dev/null +++ b/src/LeakFinder.h @@ -0,0 +1,60 @@ + + + +#ifndef SQUID_LEAKFINDER_H +#define SQUID_LEAKFINDER_H + +#if USE_LEAKFINDER +#define leakAdd(p,l) if (l) l->add(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__) + +class LeakFinderPtr : public hash_link +{ + +public: + LeakFinderPtr(void *, const char *, const int); + const char *file; + int line; + time_t when; +}; + +class LeakFinder +{ + +public: + LeakFinder(); + ~LeakFinder(); + + void *add + (void *, const char *, const int); + + void *touch(void *, const char *, const int); + + void *free(void *, const char *, const int); + + void dump(); + +private: + static HASHCMP cmp; + + static HASHHASH hash; + + hash_table *table; + + int count; + + time_t last_dump; + +}; + +#else /* USE_LEAKFINDER */ + +class LeakFinder {}; + +#define leakAdd(p,l) (void)0 +#define leakTouch(p,l) (void)0 +#define leakFree(p,l) (void)0 +#endif /* USE_LEAKFINDER */ + +#endif /* SQUID_LEAKFINDER_H */