title: Segmentation fault when increasing array size
body: <p>I am writing a C program. In the first lines, I have</p>
  
  <pre><code>typedef float m_elem[NMAX][NMAX][3];
  m_elem asa_m;   
  m_elem asa_mi[100];
  </code></pre>
  
  <p>then, some calculations. At the moment, and for each run and depending on the input, I change on the code the NMAX value, and then recompile it and run it. For NMAX values below 500, the program runs ok, but for higher NMAX values (which I need for some input files), all I get is segmentation fault. </p>
  
  <p>What do you recommend me to do here? I read about learning valgrind, but in this case I wonder if just changing compilation options somehow for allowing the program to deal with bigger matrices would help</p>
  
  <p>Thanks</p>