silly debugging question
nmoore at physics.umn.edu
Tue Apr 13 09:22:31 CEST 2004
Of late I've run into a malloc error in a c++ program using the gmp
library. Specifically, the program gives error,
*** malloc: error for object 0xbffdee80: Pointer being
reallocated was not allocated
GNU MP: Cannot reallocate memory (old_size=4294425088 new_size=4)
or when run again
*** malloc: error for object 0x2: Pointer being reallocated was
GNU MP: Cannot reallocate memory (old_size=4294425088 new_size=8)
Is the system simply running out of memory? In each (and almost every)
case the program "Abort"s immediately afterward. The code as presently
written manipulates rational numbers, (mpq_t) a number of times.
I was trying to use gdb to find the line where the program failed
earlier this evening, but the syntax seems more cryptic that dbx.
Realize its unrelated, but would none-the-less appreciate (if its easy
to explain) a description of the easiest way to give the line at which
the code fails from the gnu debugger, gdb.
More information about the gmp-discuss