httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: filtering patches
Date Mon, 10 Jul 2000 18:01:21 GMT wrote:
> They can create sub-pools easily, because they have the request_rec,
> but the data shouldn't be allocated out of a pool.  Any data
> allocated out of a pool sticks around forever.  Unless pools are
> modified to free memory, or we do some funky sub-pool management,
> pools can't be used for filters.

Nonsense.  If a filter is being treated as a black box, and doesn't
know about any external processing state, it can easily create a
subpool when called, and destroy it before returning.

> The problem with pools isn't that a filter can't find a sub-pool it
> created before.  The problem is that there are two ways to associate
> data with pools.  Either each filter has a pool, at which point all
> memory has to be allocated for each filter, and the data has to be
> copied.  Or, the data has it's own pool that is passed around with
> the data.

You're trying to solve the problem of statefulness in an environment
you just said was stateless.  "They do not know about where they
are in the request processing."  Or did you mean that they don't
know where they are in the output chain?

In any case, your statements above are flawed.  You seem to be making
tons of assumptions about how filters will use memory, and they
all seem to be worst-case.

> Not knowing which pool is the parent of the data's pool though, no
> pool can be destroyed (to free the memory), because you don't know
> which sub-pools will also be destroyed, thus freeing memory the other
> filters weren't done with yet.

Rubbish.  Any subpool would be created by the filter, and it
would know there wouldn't be any descendants.  If we had tables
with binary values (Dirk?), dealing with this would be simple.
All a filter has to do is hang some sort of pointer to the pool
off the request_rec.  That could be done now, in a messy kludgy

You have in no way convinced me of any portion of your sweeping
"pools will not work for filters" statement.
#ken    P-)}

Ken Coar                    <http://Golux.Com/coar/>
Apache Software Foundation  <>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed"   <http://ApacheUnleashed.Com/>

View raw message