3 ms·
Very good advice. I assume my C code does have memory blunders until I have run extensively through valgrind, after which I might begin to believe any other ana
by imurray 17y ago
Very good advice. I assume my C code does have memory blunders until I have run extensively through valgrind, after which I might begin to believe any other analysis I have done that suggests the code is correct.
I also tend to test a build linked with gcc’s mudflap:
gcc -g -fmudflap -lmudflap
Your program will run much faster than under valgrind. I have had bugs that have been missed by valgrind but caught with mudflap and vice-versa. Don’t try to link with mudflap and run under valgrind at the same time though, valgrind won’t work.
- bd_at_rivenhill 17y agoMany thanks, I've used valgrind a lot, but never heard of mudflap, I'll give it a try.
- imurray 17y agoDepending on your distribution it may not be installed automatically with gcc. The package you need is called libmudflap0-4.4-dev in Ubuntu 9.10.