title: Why doesn't Windows keep randomizing the base address of my executable?
body: <p>I've made a simple C-program that simply prints the address of <code>main()</code> at execution:</p>
  
  <p><code>printf("%08X\n", &amp;main);</code></p>
  
  <p>I compile it with Visual C++ 2015 with the parameter <code>/DYNAMICBASE</code>, for x86 (same thing happens when compiling for x64).</p>
  
  <p>First two times I run it, the address returned is different, as is expected. 
  However, after two times, the address the program returns stays the same:</p>
  
  <pre><code>00C31050
  00221050
  00221050
  00221050 
  </code></pre>
  
  <p>Recompiling or renaming the executable randomizes the address again.</p>
  
  <p>What is happening here? Is Windows somehow caching the executable?</p>