Subject: Re: direct copy() between two proc address spaces
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Thor Lancelot Simon <email@example.com>
Date: 06/21/2004 15:20:09
On Mon, Jun 21, 2004 at 02:47:21PM -0400, der Mouse wrote:
> > I guess i understand now: application allocates memory region from
> > private address space and next shares it some way with other process.
> > I also cannot recall anything with this functionality. Well, on the
> > other hand, what's the advantage of this scheme ?
> (a) doesn't need a cooperative common ancestor (unlike the
> mmap(MAP_ANON|MAP_SHARED)+fork method)
> (b) doesn't need a writeable file large enough to hold the memory
> (unlike the mmap-a-file method)
Here's a question: what happens if you pass an fd to /dev/zero to an
unrelated process, then mmap it MAP_SHARED on each side?
I know what I _think_ should happen, but somehow I'm not so sure it
Thor Lancelot Simon firstname.lastname@example.org
But as he knew no bad language, he had called him all the names of common
objects that he could think of, and had screamed: "You lamp! You towel! You
plate!" and so on. --Sigmund Freud