title: How large is the attributes can a class object hold? how to determine the stack/heap limit?
body: <p>I have a class which requiring a large amount of memory.</p>
  
  <pre><code>class BigClass {
  public:
      BigClass() {
          bf1[96000000-1] = 1;
      }
      double bf1[96000000];
  };
  </code></pre>
  
  <p>I can only initiate the class by "new" a object in heap memory.</p>
  
  <pre><code>BigClass *c = new BigClass();
  assert( c-&gt;bf1[96000000-1] == 1 );
  delete c;
  </code></pre>
  
  <p>If I initiate it without "new". I will get a segmentation fault in runtime.</p>
  
  <pre><code>BigClass c; // SIGSEGV!
  </code></pre>
  
  <p>How can I determine the memory limit? or should I better always use "new"?</p>