title: Visual studio to gcc, code compiles well in gcc but gives std::badalloc error at runtime
body: <p>I have a big code that uses only standard C++ libs and compiles well in gcc. As the code was actually written in VS C++ 6.0. The code runs fine in visual studio but when I use gcc compiler it gives no errors on compilation and when I run it it gives this error
   "terminate called after throwing an exception at instance std::bad_alloc what() bad alloc"
  One more confusion is that it is a numerical simulation code, it doesn't show any exception while using gdb debugging and terminates successfully but doesn't show the right results. But using gdb it doesn't terminates anywhere. So thats where I am stuck. I am unable to diagnose where does the <code>bad_alloc</code> is actually happening.</p>
  
  <ol>
  <li>The code consists of C and C++ routines</li>
  <li>Memory is allocated through new</li>
  <li>gdb doesn't show any segabort or any exception during debugging</li>
  </ol>
  
  <p>How can I debug this problem?</p>