title: Linux mapping virtual memory range to existing virtual memory range?
body: <p>In Linux, is there a way (in user space) to map a virtual address range to the physical pages that back an existing virtual address range?  The mmap() function only allows one to map files or "new" physical pages.  I need to be able to do something like this:</p>
  
  <pre><code>int* addr1 = malloc(SIZE);
  int* addr2 = 0x60000;      // Assume nothing is allocated here
  fancy_map_function(addr1, addr2, SIZE);
  assert(*addr1 == *addr2);  // Should succeed
  assert(addr1 != addr2);    // Should succeed
  </code></pre>