Valgrind is a dynamic analysis tool for Linux, OS X, Android, and Solaris systems. It can be used for profiling as well as for finding memory leaks, race conditions, and threading errors.