title: What does "Memory allocated at compile time" really mean?
body: <p>In programming languages like C and C++, people often refer to static and dynamic memory allocation. I understand the concept but the phrase "All memory was allocated (reserved) during compile time" always confuses me.</p>
  
  <p>Compilation, as I understand it, converts high level C/C++ code to machine language and outputs an executable file. How is memory "allocated" in a compiled file ? Isn't memory always allocated in the RAM with all the virtual memory management stuff ? </p>
  
  <p>Isn't memory allocation by definition a runtime concept ?</p>
  
  <p>If I make a 1KB statically allocated variable in my C/C++ code, will that increase the size of the executable by the same amount ?</p>
  
  <p>This is one of the pages where the phrase is used under the heading "Static allocation". </p>
  
  <p><a href="http://blogs.msdn.com/b/abhinaba/archive/2009/01/16/back-to-basics-memory-allocation-a-walk-down-the-history.aspx">Back To Basics: Memory allocation, a walk down the history</a></p>