httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <>
Subject Re: Apache 2.0/NSPR
Date Mon, 14 Sep 1998 15:19:41 GMT
Ben Laurie writes:
>Ben Hyde wrote:
>> Ben Laurie writes:
>> >Dean Gaudet wrote:
>> >>
>> >> How about someone describe the actual difficulties that lead to this whole
>> >> gc discussion before we take it any further?
>> >>
>> >> As far as I can recall, the only storage leaks that have ever occured in
>> >> Apache were due to people using make_sub_pool(NULL).  Something which I
>> >> made impossible in apache-nspr (or at least I think I did, I intended
>> >> to...).
>> >
>> >But there are (occasional) reasons for wanting to do that...
>> >
>> >Cheers,
>> >
>> >Ben.
>> Ok, but ...  My model of pools is that they are owned by some activity,
>> and when that activity completes they are reclaimed.  Activites
>> are usually implemented by a single thread, or process.  Of course
>> not always, for example a pool owned by a module for it's internal
>> state who's life cycle is delimeted the init file loading.
>> When an activity happens not to have it's own thread/process there is
>> always one who's extent is longer than the activity and the pool can
>> nest inside of it.
>> Having a single root pool is nicer, to my sense of style, than using
>> NULL as the root since it leaves clear the sequencing and certainty of
>> how things are torndown.  Leaving a few globals in the namespace for
>> generally useful pools?  My eyes see that as is useful, rather than
>> noisy.
>Currently the root pool is not global (I haven't checked the status in
>apache-nspr, though, but I assume it hasn't changed) - and there is no
>global pool that persists over a reset (which is exactly why you'd use a
>NULL root currently).
>Making the root pool available somehow would also keep me happy.

Ok, I'll admit it.  I too call it with make_sub_pool(NULL). I wasted a
day once trying to use the pool passed into the module init method but
that got a little too amusing.  If I recall that pool is sometimes the
configuration pool and sometimes not.

  - ben hyde

View raw message