title: Are Windows Memory Mapped File contents always zeroed by default?
body: <p>I've determined empirically that, on my system, a memory mapped file created to be a certain size is always completely zeroed by default. For example, using the call</p>
  
  <pre><code>HANDLE hMM = 
      CreateFileMapping (h,
                          NULL,
                          PAGE_READWRITE,
                          0,
                          0x01400000,//20MB
                          NULL);
  </code></pre>
  
  <p>.. and writing into a mapped view of that file always results in a 20MB file that is completely zeroed, except where I have written non-zero data.</p>
  
  <p>I'm wondering if uninitialized parts of the file can be assumed to be zeros. Is this behavior guaranteed on Windows in general?</p>