Re: sharing memory map between processes (same parent)
- From: phil-news-nospam@xxxxxxxx
- Date: 28 Apr 2008 17:48:42 GMT
On Sun, 27 Apr 2008 21:00:12 -0400 Barry Margolin <barmar@xxxxxxxxxxxx> wrote:
| In article <fv2m7o01es1@xxxxxxxxxxxxxxxxx>, phil-news-nospam@xxxxxxxx
| wrote:
|
|> I have forked two processes from the same parent. I'd like to have one of
|> them
|> do open() and mmap() to map a file into memory (madvise would also be used).
|> Then I would like the other process to be able to access that mapping. Is
|> there a way to get that mapping shared with another process (much like it
|> would be had the parent mapped it first then forked the two child processes)
|> or at least transfer the mapping from one process to another? Note that it
|> will not necessarily be a mapping of the entire file, and the first process
|> may be keeping the descriptor open for later mapping of another part of the
|> file. Also, it may be possible to make it so the first process never does
|> any access of the mapped pages.
|
| I don't know of any way to transfer a mapping. Processes don't
| generally have the ability to change anything about other properties,
| other than through low-level manipulation like ptrace().
|
| Why not just have both processes mmap() the same file?
The other process will be busy at the time. I was hoping for something that
was similar to being able to transfer an open file descriptor.
--
|WARNING: Due to extreme spam, I no longer see any articles originating from |
| Google Groups. If you want your postings to be seen by more readers |
| you will need to find a different place to post on Usenet. |
| Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |
.
- References:
- sharing memory map between processes (same parent)
- From: phil-news-nospam
- Re: sharing memory map between processes (same parent)
- From: Barry Margolin
- sharing memory map between processes (same parent)
- Prev by Date: Re: TCP connect in Non Blocking Mode
- Next by Date: Re: sharing memory map between processes (same parent)
- Previous by thread: Re: sharing memory map between processes (same parent)
- Next by thread: Re: sharing memory map between processes (same parent)
- Index(es):
Relevant Pages
|