apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: Problems with DSOs and Pools
Date Mon, 11 Sep 2006 14:48:39 GMT
On 9/10/06, Bojan Smojver <bojan@rexursive.com> wrote:
> Quoting Bojan Smojver <bojan@rexursive.com>:
> > Ah well, here is a version with calloc(). Since we wouldn't
> > be doing anything with pools here and it would be "for the duration of
> > the process", I guess we should be OK.
> Any thoughts on this approach?
> I'm not sure if I missed some e-mails from the list on this or if
> there was no discussion on the topic after the last (incomplete, Unix
> only) patch...

I really don't like this idea.  Allocating it via calloc and then
never freeing it is bad form IMO, it means that this stuff will likely
never be cleaned up, which means that anyone running inside of
valgrind/purify/etc will get spurious errors.  If we're going to go
based off of a NULL pool argument, I'd prefer to allocate out of a
known to be safe global pool, which we can create as part of
apr_initialize, then cleanups will happen normally at shutdown time.


View raw message