----- Original Message -----
From: "Adrian Chadd" <adrian@creative.net.au>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <squid-dev@squid-cache.org>
Sent: Monday, May 07, 2001 10:50 PM
Subject: Re: cbdataFree
> Damnit, I didn't reply-to-all .. ;-)
>
>
> On Mon, May 07, 2001, Robert Collins wrote:
> > refcounted io buffers for the filter code.
>
> Aahaha. How'd I guess? :-)
I dunno. Mental Telepathy?
> > refcount differs from cbdata in that it's being passed along a chain
of
> > users that _may split_. And if the chain splits, then two
cbdataFree's
> > would occur.
>
> Yup, I've noted this.
>
>
> > I'm happy to use straight cbdata, with an overlaid unLock and Lock
> > function and put in a _new_ refcount variable - but that seems
rather..
> > uhmm wasteful. I'd far rather reuse the cbdata locks variable.
>
>
> The cbdata system was never designed as a refcounted allocator - it
> was designed as a verifyer of callback pointers. What we probably
> want to do is extend the cbdata allocator to take a "free on
refcount -> 0"
> flag when we setup a cbdata pool.
>
> Unless you can think of a clean place to call cbdataFree() :-)
Other than the end of the filter chains? groan.
I've extended cbdataAddType to do what you've suggested.
If anyone cares to look: newhttp src/cbdata.c.
Rob
Received on Mon May 07 2001 - 07:27:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:00 MST