title: Segfault when allocating large array in Fortran
body: <p>I have a very simple example of a strange <a href="https://stackoverflow.com/questions/20458291/problems-compiling-gfortran-in-cygwin-with-large-memory-requirements">segfault I am having</a> and it is as follows:</p>
  
  <pre><code>program big_array_segfault
  
    integer :: nX = 13000
    integer :: nY = 100000
    real(kind = 8), allocatable :: bigarr(:,:)
  
    allocate(bigarr(nX, nY))
  
  end program big_array_segfault
  </code></pre>
  
  <p>Note that I have 20 GB of RAM to work with and this does not even begin to approach that. Everything I have seen online suggests that this may be a problem with Stack space vs Heap space but I don't know how to control the memory in that way using Fortran.</p>
  
  <p>For what it is worth, the I am compiling with <code>gfortran -o big_arr.exe test.f90</code> so there is nothing special going on in the compilation.</p>