This is the mail archive of the
mailing list for the Cygwin project.
Re: mmap() for shared memory?
- To: "Cygwin at Sourceware dot Cygnus. Com" <cygwin at sourceware dot cygnus dot com>
- Subject: Re: mmap() for shared memory?
- From: "Elliot Mednick" <elliot at lexra dot com>
- Date: Wed, 7 Jun 2000 21:53:13 -0400
- Reply-To: <elliot at lexra dot com>
> Where are you getting the memory from? mmap has to be given something
> to map - it doesn't create memory out of thin air. Normally you give
> it an open file to map; the only "empty" file is /dev/zero and that's
> not shared anyway.
Thanks for your response. I'm pretty sure I'm calling mmap correctly. I'm
mapping a file and I can see the file being modified afterwards. The
problem is that the client side never sees the change. It's almost like
there is some disconnect, like the MAP_SHARED parameter didn't "take".
There was a posting in January with a similar problem which included an
example that worked under real Unix but not under Cygnus; I tried it and
couldn't get it to work either with the latest stuff (1.1.2 dll).
>> Perhaps someone can suggest the optimal IPC mechanism under Cygwin.
> The optimal IPC is, well, IPCs, stuff like shmget(). Unfortunately,
> cygwin doesn't support those.
I looked at Ludovic Lang's Cygwin IPC package, but it uses mmap, so it
doesn't buy me anything (except compatibility with shm). And it uses a
daemon, which gets in the way for what I need this for.
Want to unsubscribe from this list?
Send a message to email@example.com