apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: [PROPOSAL] apr_shm_t, a new shared memory API to replace old
Date Tue, 08 Jan 2002 18:48:47 GMT
On Tuesday 08 January 2002 10:38 am, Mladen Turk wrote:
> ----- Original Message -----
> From: "'Aaron Bannert'" <aaron@clove.org>
> To: "Mladen Turk" <mturk@mappingsoft.com>
> Cc: <dev@apr.apache.org>
> Sent: Tuesday, January 08, 2002 7:04 PM
> Subject: Re: [PROPOSAL] apr_shm_t, a new shared memory API to replace old
> 
> 
> > > Ok, I'll try.
> > > When creating shared memory segment you have two choices, either using
> > > file or anonymous mem segment. Well, the problem with using anonymous
> > > mem segment is that you still need the name to identify that segment if
> > > you want to use it across non-child processes.
> > No, anonymous memory is not for use across non-child processes. If
> > you want to use memory across unrelated processes you have to make
> > it name-based.
> 
> Yes, that's my point. Anonymous shmem can be cross-process (on WIN32) if you
> give it the name, then instead using regular file it will be backed up by
> the system paging file. So, you need to name it.

Once you give it a name, it isn't anonymous anymore.  You want to use
key-based instead of file-based naming though, so that the underlying
system is different.  That is fine, this API can handle that.  Because of the
way non-child process shared memory must work, you must communicate the
name between the two children.  There are only a couple of ways to do this,
to make it more portable, Aaron's design requires that you use a file.  If you are
using file based shared mem, the file is the actual shared memory. If you are
using key-based shared mem, the file just stores the name of the shared memory
segment.

Ryan

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

Mime
View raw message