How does mmap work when 2 programs map the same file
<p>I am trying to understand how <code>mmap</code> works while looking at <a href="http://man7.org/linux/man-pages/man2/mmap.2.html" rel="nofollow">man mmap</a>.</p>

<p>As I understand it, it adds a mapping to the page table that maps between the file and the virtual address (which is the address that is given <code>void *addr</code>)</p>

<p>So, what happens when 2 programs map the same file?
Are there 2 entries in the page table, one for each program?</p>