Dear Jed, What did I do wrong on this? Nothing comes out from -malloc 0:
rebecca at YuanWork:~/linux/code/twoway/twoway_new/workingspace$ valgrind -malloc 0 ./twgcqt2unffnictvscj.exe -options_file option_all valgrind: 0: command not found rebecca at YuanWork:~/linux/code/twoway/twoway_new/workingspace$ valgrind --malloc 0 ./twgcqt2unffnictvscj.exe -options_file option_all valgrind: 0: command not found Thanks a lot! Rebecca Quoting Jed Brown <jed at 59A2.org>: > On Sat, 17 Apr 2010 10:10:00 -0400, "(Rebecca) Xuefei YUAN" > <xy2102 at columbia.edu> wrote: >> Dear Matt, >> >> I did run with valgrind, and the error message is for a >> DAGetLocalVector() in FormFunction() which is not related to this >> structure. > > This first error is causing memory corruption which causes the invalid > free() you see later. Run with valgrind and -malloc 0, then fix every > item in the order they appear (many of the later items will be caused by > earlier corruption, so rerun valgrind after each fix). > > Jed > > -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102