title: When a large block of memory is requested on the heap, if contiguous space is not available on the RAM, is it allocated on the disk(swap)?
body: <p>In Linux, when memory is requested (using <code>calloc / malloc</code>), if a contiguous block of the requested size is not available does the kernel map multiple separate pieces of memory into one single virtual block and hand it over to the application or is it allocated on disk?  </p>
  
  <p>If it is allocated on disk, when a large enough block becomes free, is it automatically moved to the RAM or does it live on the disk for its life?</p>