4 ms·
Shared memory also means that any modifications are also shared, which is really not good in this case. We could mark the sections RO I suppose, but then we hav
by mdwrigh2 12y ago
Shared memory also means that any modifications are also shared, which is really not good in this case. We could mark the sections RO I suppose, but then we have them occasionally copying things out of the RO pages to modify them which just bloats the address space (though doesn't change the number of backing pages). It's also slightly more brittle because you have to be careful about marking everything shared RO.
> Better to only share memory that processes explicitly want to share, and make it clear which one owns any given region of memory.
We are only sharing memory that we explicitly want to share: we load only what we care about, then fork.