apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: Handholding: shared memory
Date Sun, 12 Aug 2001 16:00:37 GMT
On Sunday 12 August 2001 04:32, Graham Leggett wrote:
> Hi all,
> I need a bit of handholding with the allocation of shared memory
> segments in APR. A couple of questions:
> - Is the reqsize parameter in apr_shm_init() optional? In other words
> does this follow the behavior of the MM library where if the value is
> set to zero it defaults to the maximum possible size with a soft maximum
> of 64MB?

That's how it works on Unix, but it won't work that way anyplace else.  It is
also unlikely to continue to work that way on Unix.  A lot of people are
talking about re-writing the shared memory code on Unix.

> - Is the setting of the shared memory segment name using
> apr_shm_name_get() and apr_shm_name_set() optional or mandatory?

Unix shared memory is all anonymous, it must be created by the parent, and
inherited by the child.  Again, when somebody has the time/energy to fix
Unix shared memory, this will change.

> I would like to use apr_shm_name_set() to give a particular segement a
> name, but it's not clear in the APR header docs as to whether this is
> possible on all platforms, or whether on some platforms only anonymous
> shared memory is possible.

It's not possible on all platforms, yet.

Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net

View raw message