----- Original Message ----- From: "Ryan Bloom" <[EMAIL PROTECTED]> To: "Mladen Turk" <[EMAIL PROTECTED]>; "'Aaron Bannert'" <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Tuesday, January 08, 2002 7:48 PM Subject: Re: [PROPOSAL] apr_shm_t, a new shared memory API to replace old
> > 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 You are right It's not anonymous if you give it a name :). Imagine the scenario when you want to use the "named" or file backed shmem that will be created using tmpnam. Then all the processes would need to know the true path of that file to be able to communicate with you. Of course you could make that file unique simply stating: all the users of the apr must have different shmem file names. So I want to make the unique file name but still be able to access it by It's name like 'Apache 2.0 rev 1'. On the other hand you could simply make the temp file and give it the name you want, and anyone from outside could get your shmem simply naming you. MT.
