title: Where is local variable allocated? Heap or stack?
body: <p><a href="http://www-ee.eng.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.8.html" rel="noreferrer">http://www-ee.eng.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1.8.html</a>
  This page says local variables and parameters passed are allocated on stack, So I tried:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #define A 2000000
  #define B 2
  
  typedef struct {
      int a[A][A];
  } st;
  
  void fun(st s){}
  
  void main()
  {
      st s;
      //fun(s);
  }
  </code></pre>
  
  <p>No error reported after compiled and run. But when I de-annotate <code>//fun(s)</code> , Then SIGSEGV is caught. Can anyone tell why?</p>