Subject: Re: direct copy() between two proc address spaces
To: None <firstname.lastname@example.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 06/20/2004 20:33:14
>> I've long thought that in addition to file descriptors, it should be
>> possible to send access to pages of memory through AF_LOCAL sockets,
>> sharing memory between unrelated processes (unrelated in terms of
>> process parenting and fork-tree, that is).
> If i understand your idea correctly, isn't this kind of functionality
> should be available using POSIX named shared memory ?
I don't know. Where can I find a description of this facility?
I suspect, though, that it is not, because all of the shared memory
interfaces I have seen demand that the memory be created as shared
memory - it is not possible, using them, to take memory allocated by
some other means (data segment, malloc(), etc) and share it, which it
is with what I am suggesting.
Conceptually, mmap() on /proc/%d/mem should create the same kind of
sharing potential. (Whether this is actually implemented, of course,
is another matter, and one critical difference is that what I am
suggesting puts control in the hands of the process originally owning
the memory, which mmap() on procfs mem files doesn't.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B