apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: httpd-ldap and apr shared memory
Date Wed, 06 Mar 2002 19:10:19 GMT
On Wed, Mar 06, 2002 at 08:42:26AM -0500, Tim Moloney wrote:
> I took a look at apr_rmm.h and I vaguely understand what it's doing.
> I see two approaches to fixing httpd-ldap.
> - Replace the shm calls with rmm calls.  If this is done, what is the
>   memory buffer (third arg) that is passed to apr_rmm_create()?
> - Use the rmm calls on the shared memory.  Would the shared memory would
>   be the memory buffer (third arg) passed to apr_rmm_create()?

I think you're on the right track.

create the shm
set up the anylock (it's just for determining the scope of the lock)
create the rmm (pass in the anylock and the shm)

then in the child, like in child_init():

attach to the shm
attach to the rmm

> Either way...
> - What is "the appropriate type of lock" for rmm (second arg to
>   apr_rmm_create())?

It's a way to tell the internals of the rmm how wide of a scope
to use for the locking. It comes down to:
intrathread, intraprocess, both (aka global)

> - Are the rmm pool and the shm pool the same (fifth arg to
>   apr_rmm_create())?

The pool is just a way to keep track of resources and release
them at the appropriate time. In this case they're probably the same.


View raw message