Friday, 11 June 2010

How to find memory leaks?

As long as your program is small and single threaded its easy to debug the memory leaks and corruptions, but when the programs grows bigger and bigger...we now have a problem of finding missing memory allocations and stack corruptions. There are tools to find these and one of them is valgrind which I found it to be easy to use and efficient.


valgrind --trace-children=yes --leak-check=full --log-file=/tmp/log

No comments:

Post a Comment