]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
It seems that LeakFinder.h is missing in your commit.
authorwessels <>
Thu, 24 Nov 2005 06:38:56 +0000 (06:38 +0000)
committerwessels <>
Thu, 24 Nov 2005 06:38:56 +0000 (06:38 +0000)
Duane: after any commit it would be better if you check if squid
builds correctly.

Regards

Guido

src/LeakFinder.h [new file with mode: 0644]

diff --git a/src/LeakFinder.h b/src/LeakFinder.h
new file mode 100644 (file)
index 0000000..dfb2ae8
--- /dev/null
@@ -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 */