This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mmap() for shared memory?


> 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 cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]