title: Does mmap with MAP_NORESERVE reserve physical memory?
body: <p>The <a href="http://kernel.org/doc/man-pages/online/pages/man2/munmap.2.html" rel="noreferrer">mmap</a> documentation says following about the flag MAP_NORESERVE.</p>
  
  <blockquote>
    <p>Do not reserve swap space for this mapping.  When swap space is
    reserved, one has the guarantee that it is possible to modify the
    mapping.  When swap space is not reserved one might get SIGSEGV upon a
    write if no physical memory is available.  </p>
  </blockquote>
  
  <p>What I want actually is to only reserve virtual memory addresses and not have actual physical memory allocated. Can this be done with mmap with MAP_NORESERVE? If I want to use any physical memory, I would mmap it again with MAP_FIXED in the address range within the one alloted through the mmap with MAP_NORESERVE. </p>
  
  <p>To summarize, I want the kernel to not reserve any physical page for memory allocated with mmap with MAP_NORSERVE flag. Does it really work like this or do the kernel allocates physical pages if it has enough physical memory?</p>