lkml.org 
[lkml]   [1996]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: anonymous shared mmap. Where? (fwd)
From
Date
> > On Wed, 24 Jul 1996, A.N.Kuznetsov wrote:
> > >
> > > Unpleasant discovery, 2.0 has no shared anonymous mmap ???
>
> > It's definitely 2.1, if even that. Shared anonymous mmap is a monstrosity
> > (even the name is a oxymoron), and it's hard to implement to boot.
>
> Can someone tell me what shared anonymous mmap is. Is it a way to
> create shared memory regions between a process and its children, or is
> it a way to create shared memory regions between unrelated processses?

Between process and its children.

However I used recently alternate strategy, when I needed
a shared page or two:

fp = mktemp();
fwrite(fp,....); <-- about pagefull
lseek(fileno(fp),0,0); <-- MUST do, linux oddity is that file io
pointer affects the mmap() of said file..
p = mmap( ... )
fclose(fp);

fork(); and be happy.

> Thanks,
>
> Jim

/Matti Aarnio <mea@utu.fi>


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.037 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site