CS346 - Spring 2011
Database System Implementation

Using Valgrind
Valgrind is an excellent tool for the C/C++ programmer to help find run-time memory leaks and corruption errors. It detects reading or writing beyond the bounds of an array or within freed memory. It detects memory leaks as well as any attempts to free memory multiple times. Valgrind instruments the binary at run time, so there is no need to modify your Makefile.

The Valgrind Quick Start Guide includes some information on how to run your program under Valgrind. We are requiring the use of Valgrind before submitting your programs (and before heading to the TA for debugging help!) because we strongly believe that it will help you create code that is more robust, it will help you find many common bugs very quickly, and it will enable you to focus your programming time on tackling the interesting database implementation issues in RedBase.