For static code analysis I found:
I used it to its full power by invoking (at the top level of the project):
cppcheck --recursive --all --errorsonly --style
Also, SPlint (http://en.wikipedia.org/wiki/SPlint) seems promising, though it is for C code only (no C++).
A comprehensive list of static code analysis could be found in Wikipedia:
About application profiling, the GNU Profiler (gprof) does a good job. It is light-weight and has support in GCC. This is an excellent article about using gprof:
- Programmer's Toolkit: Profiling programs using gprof(http://linuxgazette.net/100/vinayak.html)
Memory leak detection has many options. Of the best is using Valgrind(http://valgrind.org/). However, I found an interesting and promising feature that has been added to the gcc. This feature is called Mudflap. It is easy to use as a compiler flag and adds memory debugging support directly into your application using libmudflap. More interesting information could be found here:
It is so promising that it will be integrated into the QNX IDE:
It can print the memory leaks on program exit via the (-print-leaks) option
Memory debugging tools are so many. There is a list on Wikipedia article:
The task of memory leak detection is achievable using lightwieght tools. These tools basically replaces the default C library malloc() and free() with special debugging implementations. Notable is mtrace(), the memory debugger built in the GNU C library:
A good article about memory leak detection in C++:
And finally, all what you can dream of are collected in one article, in the GRASS wiki here:
Hope you find this useful!