title: gcc compile time and memory usage changing as array size in source code changes
body: <p>This is gcc 4.4.6 on Linux.</p>
  
  <p>Here's the behavior</p>
  
  <p><strong>bizarre.c</strong></p>
  
  <pre><code>double a[500000000];
  
  main() {
  }
  </code></pre>
  
  <p>If I compile this using:</p>
  
  <pre><code>gcc bizarre.c
  </code></pre>
  
  <p>Then the compiler uses 4G of memory, and takes a long time.</p>
  
  <p>If I make the array size 50000000, the the compilation takes considerably less memory and time.</p>
  
  <p>It's like the compiler is executing the code that it's compiling.</p>
  
  <p>I realize that creating a humongous array this way might not be best practice, but any explanations?</p>