You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Roy T. Fielding" <fi...@ebuilt.com> on 2001/04/27 06:29:47 UTC

global pools

Once upon a time, httpd would create a global pool as the result from
alloc_init and use that pool as the parent of almost all of the other
pools (I say almost only because there is one pcommands pool that was
separate, though I don't know why).

Now, httpd tells apr to initialize itself and alloc, but doesn't
get the global pool in return.  httpd then needs to create other
global pools.  I think this is leading to cases where the proper
cleanups are not being done, but its a little hard to tell because
there isn't much in the way of continuity (pools are created in
subroutines, assumed to exist at a higher level, and then destroyed
in other places).  Yuck.

Is there some reason that apr can't give us the global pool, or allow
us to give it the global pool?

....Roy


Re: global pools

Posted by Bill Stoddard <bi...@wstoddard.com>.
+1
----- Original Message ----- 
From: Greg Stein <gs...@lyra.org>
To: <ne...@apache.org>; <de...@apr.apache.org>
Sent: Friday, April 27, 2001 4:03 PM
Subject: Re: global pools


> On Thu, Apr 26, 2001 at 09:29:47PM -0700, Roy T. Fielding wrote:
> >...
> > Is there some reason that apr can't give us the global pool, or allow
> > us to give it the global pool?
> 
> I can't think of one, so I'd be fine with seeing apr_initialize() return a
> global pool.
> 
> Cheers,
> -g
> 
> -- 
> Greg Stein, http://www.lyra.org/
> 


Re: global pools

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Apr 26, 2001 at 09:29:47PM -0700, Roy T. Fielding wrote:
>...
> Is there some reason that apr can't give us the global pool, or allow
> us to give it the global pool?

I can't think of one, so I'd be fine with seeing apr_initialize() return a
global pool.

Cheers,
-g

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

Re: global pools

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Apr 26, 2001 at 09:29:47PM -0700, Roy T. Fielding wrote:
>...
> Is there some reason that apr can't give us the global pool, or allow
> us to give it the global pool?

I can't think of one, so I'd be fine with seeing apr_initialize() return a
global pool.

Cheers,
-g

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

Re: global pools

Posted by Jeff Trawick <tr...@bellsouth.net>.
"Roy T. Fielding" <fi...@ebuilt.com> writes:

> Is there some reason that apr can't give us the global pool, or allow
> us to give it the global pool?

I don't know of such a reason... I think that the thing to do would be
to have apr_initialize() return a pool, not take a pool (your second
choice).

Since apr_initialize() parmlist are to be changed this is probably the
time to add the version check.

       apr_initialize(&p, APR_???);

I don't recall exactly what Greg Stein wanted...

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: global pools

Posted by dean gaudet <dg...@arctic.org>.
i suppose pcommands data could be allocated in pglobal instead...

-dean

On Thu, 26 Apr 2001, Roy T. Fielding wrote:

> Once upon a time, httpd would create a global pool as the result from
> alloc_init and use that pool as the parent of almost all of the other
> pools (I say almost only because there is one pcommands pool that was
> separate, though I don't know why).
>
> Now, httpd tells apr to initialize itself and alloc, but doesn't
> get the global pool in return.  httpd then needs to create other
> global pools.  I think this is leading to cases where the proper
> cleanups are not being done, but its a little hard to tell because
> there isn't much in the way of continuity (pools are created in
> subroutines, assumed to exist at a higher level, and then destroyed
> in other places).  Yuck.
>
> Is there some reason that apr can't give us the global pool, or allow
> us to give it the global pool?
>
> ....Roy
>
>