On Tuesday 08 January 2002 10:38 am, Mladen Turk wrote: > ----- Original Message ----- > From: "'Aaron Bannert'" <[EMAIL PROTECTED]> > To: "Mladen Turk" <[EMAIL PROTECTED]> > Cc: <[email protected]> > 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 [EMAIL PROTECTED] Covalent Technologies [EMAIL PROTECTED] --------------------------------------------------------------
