title: Why use calloc to initialize the allocated memory to zero?
body: <p>We know that the heap is an area of demand-zero memory that begins immediately after the uninitialized data area and grows upward (toward higher addresses). By demand-zero, it means the first time the CPU touches a virtual page in heap area, the corresponding physical page will be all zeros.</p>
  <p>If that is the case, then why there is a function <code>calloc</code> used to initialize the allocated memory to zero? Why do demand-zero pages need to be initialized zero again if they will be zero already when accessed?</p>