Internally, an OS like Linux maps <i>every</i> page in a requested piece of memory to a read-only page of zeros. When you attempt to read from this page, it works fine. When you attempt to write to it, the MMU causes a page-fault and the OS inserts a page where the zero-page is, and then continues your program execution. Thus, it doesn&#x27;t actually have to allocate any memory for you if you never <i>write</i> to the new pages.<p>But the OS&#x2F;MMU doesn&#x27;t distinguish between a regular write, and a write of zero. Thus, if you manually zero every page you get (And thus write zeros to the read-only zero-page), it&#x27;ll page-fault back to the OS and the OS will have to allocate a new page so that the write succeeds - Even though if you didn&#x27;t do the zeroing of memory you would have gotten the same effect of having a bunch of zeros in memory, but without having to allocate any new pages for your process.