apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Moloney <molo...@mrsl.com>
Subject Re: httpd-ldap and apr shared memory
Date Wed, 06 Mar 2002 13:42:26 GMT
Aaron Bannert wrote:

> On Wed, Mar 06, 2002 at 07:05:04AM -0500, Tim Moloney wrote:
> 
>>Further investigation shows that the new shared memory API in APR does
>>not include the functionality of the old API.  Specifically, the
>>following functions are missing:
>>
>>  apr_shm_malloc()
>>  apr_shm_calloc()
>>  apr_shm_free()
>>
>>So the solution to get httpd-ldap running is to complete APR's new
>>shared memory API.  Adding this functionality is beyond me but I'll
>>post it here so that someone more knowledgable can fix it.
>>
>>By the way, I currently have httpd-ldap running by commenting out the
>>httpd-ldap code that uses shared memory.
> 
> Actually, the malloc/calloc/free code was moved somewhere more generic.
> This allows the apr_shm.h API to deal with only the basics of shared
> memory allocation/deallocation, and do so in a way that is fully
> cross-platform. The old API didn't support non-process-inheritance
> systems like Win32, OS/2, etc.
> 
> See apr_rmm.h in apr-util. If you need more details I'd be happy to
> answer your questions over on the dev@apr.apache.org mailing list.


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()?

Either way...

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

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

-- 
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '


Mime
View raw message