What is valgrind?
Valgrind is a tool for detecting various memory problems in your code, such as: • Use of uninitialised memory; • Reading/writing memory after it has been freed; • Reading/writing off the end of malloc’d blocks; • Reading/writing inappropriate areas on the stack; • Memory leaks — where pointers to malloc’d blocks are lost forever; • Passing of uninitialised and/or unaddressible memory to system calls; • Mismatched use of malloc/new/new [] vs free/delete/delete []; • Some misuses of the POSIX pthreads API. Valgrind works on Linux/x86 only (on Windows, consider tools such as Purify or BoundsChecked; there may be other tools). Valgrind translates x86 instructions into instrumented code, basically inserting various checks on memory references. Because its still not completely aware of all sorts of x86 instruction set extensions like 3DNow and SSE, you should probably compile your code in “vanilla” pentium mode. If your code links against OpenGL libraries from NVidia then you can disable th