title: Segmentation fault due to lack of memory in C
body: <p>This code gives me segmentation fault about 1/2 of the time:</p>
  
  <pre><code>int main(int argc, char **argv) {
      float test[2619560];
      int i;
      for(i = 0; i &lt; 2619560; i++)
          test[i] = 1.0f;
  }
  </code></pre>
  
  <p>I actually need to allocate a much larger array, is there some way of allowing the operating system to allow me get more memory?</p>
  
  <p>I am using Linux Ubuntu 9.10</p>