[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C++ exception handling question



On 11/5/06, Paul E Condon <pecondon@mesanetworks.net> wrote:
I've written a program in C++ using STL for some fairly
tricky simulation work. The program works, but fails
during initialization for some choices of input parameters.
I think the problem is not enough RAM, but I'd like to
confirm that, so I tried enclosing the relevant parts
of int main(...) in a try block to see what exceptions
I could catch. (I'm using Debian Sarge, and GNU C++ from
Debian repository.)

Since others have comment on the likely cause, I'll make a different
suggestion: see if you get anything useful from the massif tool in
valgrind.  It calls itself a "heap profiler," but it tracks stack
usage, as well.  That should at least tell you if you're getting into
the no-more-memory realm.

--
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com



Reply to: