title: Program stops when defining large dynamic 2D array in C
body: <p>I am trying to define two dynamic 2-dimensional arrays using malloc and here is the code (I know that M = 118 and N = 186):</p>
  
  <pre><code>int **Cf;
  Cf = (int **) malloc(M * sizeof(int *));
  for (i = 0; i &lt; N; i++)         
      Cf[i] = (int *) malloc(N * sizeof(int));
  </code></pre>
  
  <p>The array Cf allocates memory with no problem. However, my program crashes when it comes to Ct. I debugged the code and found out that <code>Ct[i] = (int *) malloc(N * sizeof(int))</code> fails when <code>N=164</code> which is kinda weird.</p>