title: How to find out what size array fits in stack memory?
body: <p>It is my impression that when doing this </p>
  
  <pre><code>void stuff() {
      int arr[1000];
      //do some stuff
  }
  </code></pre>
  
  <p>Then the array could be allocated either in heap or stack memory depending on its size and the limits of the CPU.</p>
  
  <p>I'm optimizing a script that bruteforce tests some calculations and since the estimated time is currently several weeks, I'd like to get that down as much as possible, getting as much sample data as possible fitted in the stack would help I think.</p>
  
  <p>Is there a way to find out how big of an array I can declare?</p>