httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: SDBM 2.0 'namespace protection'
Date Fri, 01 Dec 2000 21:01:08 GMT
On Fri, Dec 01, 2000 at 12:10:56AM +0000, Tony Finch wrote:
> rbb@covalent.net wrote:
> >> I don't see any purpose served by losing any of those mods.
> >
> >The reason for losing those mods, is that pools are the wrong solution, as
> >is, I believe APR.  APR would be the correct solution if it wasn't tied to
> >pools, but it is.
> 
> On the whole the sdbm changes (relative to the sdbm in perl) are
> minor, afaics. I can't see that the use of pools is a problem (mostly
> because sdbm doesn't do much allocation), except in one case: in
> sdbm_open() a malloc() followed almost immediately by a free() was
> changed into allocation from a long-lived pool (i.e. a memory leak).

"long-lived pool" is making a supposition about that pool. In fact, that
pool could be very short lived :-)

[ and concretely: Joe Orton has patched mod_dav to do just that; that patch
  will be incorporated into Apache 2.0 in some fashion, but there are a few
  things to sort out first. ]

In any case... Tony: update your working copy (I changed that code yesterday
at Ryan's suggestion); the malloc was put back and the memory is freed at
close time or pool cleanup time. The pools are still used for files. (we
also use APR for advisory locks on those files)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message