From: adrian <> Date: Fri, 25 Oct 2002 04:53:44 +0000 (+0000) Subject: Add some more debugging ouput, helpful for tracking allocations in X-Git-Tag: SQUID_3_0_PRE1~573 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=159be25d8dd8034805d93c6c26f65d49ec72013d;p=thirdparty%2Fsquid.git Add some more debugging ouput, helpful for tracking allocations in the cache.log file. --- diff --git a/src/cbdata.cc b/src/cbdata.cc index 7bd997a712..fc263cb248 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -1,6 +1,6 @@ /* - * $Id: cbdata.cc,v 1.46 2002/10/14 08:26:30 robertc Exp $ + * $Id: cbdata.cc,v 1.47 2002/10/24 22:53:44 adrian Exp $ * * DEBUG: section 45 Callback Data Registry * ORIGINAL AUTHOR: Duane Wessels @@ -162,6 +162,7 @@ cbdataInternalAlloc(cbdata_type type) #if CBDATA_DEBUG dlinkAdd(p, &p->link, &cbdataEntries); + debug(45, 3) ("cbdataAlloc: %p %s:%d\n", &p->data, file, line); #endif return (void *) &p->data; } @@ -175,12 +176,12 @@ cbdataInternalFree(void *p) { cbdata *c; FREE *free_func; + c = (cbdata *) (((char *) p) - OFFSET_OF(cbdata, data)); #if CBDATA_DEBUG debug(45, 3) ("cbdataFree: %p %s:%d\n", p, file, line); #else debug(45, 3) ("cbdataFree: %p\n", p); #endif - c = (cbdata *) (((char *) p) - OFFSET_OF(cbdata, data)); CBDATA_CHECK(c); c->valid = 0; if (c->locks) {