title: Linux core dumps are too large!
body: <p>Recently I've been noticing an increase in the size of the core dumps generated by my application. Initially, they were just around 5MB in size and contained around 5 stack frames, and now I have core dumps of > 2GBs and the information contained within them are no different from the smaller dumps.</p>
  
  <p>Is there any way I can control the size of core dumps generated? Shouldn't they be at least smaller than the application binary itself?</p>
  
  <p>Binaries are compiled in this way:</p>
  
  <ul>
  <li>Compiled in release mode with debug
  symbols (ie, -g compiler option in
  GCC).</li>
  <li>Debug symbols are copied onto a<br>
  separate file and stripped from the<br>
  binary.</li>
  <li>A GNU debug symbols link is    added
  to the binary.</li>
  </ul>
  
  <p>At the beginning of the application, there's a call to <code>setrlimit</code> which sets the core limit to infinity -- Is this the problem?</p>