2 ms·
That's true on Linux, but is it also true about other OSes? Also, this will map the file privately (MAP_PRIVATE), meaning every process gets its own copy in it
by lobster_johnson 15y ago
That's true on Linux, but is it also true about other OSes?
Also, this will map the file privately (MAP_PRIVATE), meaning every process gets its own copy in its address space, and any coordination will have to go through the IO subsystem to reach the other processes.
Sharing with MAP_SHARED will save space by sharing the memory between processes. It's also possible to share memory not backed by a file, which is even more efficient.