I want to use POSIX Shared Memory and my question is about the usage of msync()
and munmap()
after calling mmap(MAP_SHARED)
.
- Are the changes made to the shared memory segment of one process visible to the shared memory segment of the other process without the use of
msync()
? - Are the changes made to the shared memory segment only visible in the file after
msync()
? - Are the changes saved when the shared memory segment is unmapped without the prior usage of
msync()
?
I have the impression msync()
is only useful to apply the changes to underlying file and not to the shared memory.