[vox-tech] mmap()

Vincenzo Ampolo vincenzo.ampolo at gmail.com
Tue Oct 22 18:07:26 PDT 2013


On 10/22/2013 03:45 PM, Norm Matloff wrote:
> Any ideas?

Without knowing anything about NFS internals, what about the fact that 
when A writes it should flush the NFS file?

Also, which flags are using ?

 From the man page [1]
...
MAP_SHARED and MAP_PRIVATE describe the disposition of write references 
to the memory object. If MAP_SHARED is specified, write references shall 
change the underlying object. If MAP_PRIVATE is specified, modifications 
to the mapped data by the calling process shall be visible only to the 
calling process and shall not change the underlying object. It is 
unspecified whether modifications to the underlying object done after 
the MAP_PRIVATE mapping is established are visible through the 
MAP_PRIVATE mapping. Either MAP_SHARED or MAP_PRIVATE can be specified, 
but not both. The mapping type is retained across fork().
...

In general, what is the problem you are trying to solve? Using a nmapped 
file on NFS sounds a little bit tricky to me.


[1]  http://linux.die.net/man/3/mmap

Best,

-- 
Vincenzo Ampolo
http://goshawknest.wordpress.com/
http://vincenzo-ampolo.net/


More information about the vox-tech mailing list