If I create an mmap(2)
of a file with a prot
parameter of PROT_READ
only and the file backing it is also read-only and does not change, is there any performance difference (or any difference at all) between MAP_SHARED
and MAP_PRIVATE
? Will the kernel do something differently between the two?
(The documentation only refers to difference of behaviour in terms of "updates", but as it is PROT_READ
there can be no updates. I wonder if there is some other difference?)