httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Changing the ap_strerror prototype
Date Fri, 21 Apr 2000 16:43:20 GMT
On Fri, 21 Apr 2000, Ben Laurie wrote:

> wrote:
> > 
> > I lost the original thread (sorry).
> > 
> > Rather then changing the ap_strerror prototype to take a buffer and a
> > length, why don't we fix the actual problem and fix our memory allocation
> > scheme?
> > 
> > The problem was brought up with pools not being right when APR was first
> > started.  At the time, Dean proposed a possible solution to the problem,
> > using pools to implemented mallc/free, palloc, and shared memory
> > palloc.
> > 
> > Take a look through the archives, and lets stop fixing these things one at
> > a time and fix it for good.  This scheme would allow us to pass in a
> > single pool, and allocate memory correctly whenever we need it.
> The problem is freeing. Either you create a new pool, explicitly free or
> leak. None of those are preferable to passing a buffer and a length, in
> many case. This is one of those cases, IMO. There's also the efficiency
> thing, but that hardly applies to this particular function.

I know what the problem is.  Dean's proposal from a year ago handled this
case, by allowing people to allocate and free from within a pool.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message