Running Valgrind
suggest changevalgrind ./my-program arg1 arg2 < test-input
This will run your program and produce a report of any allocations and de-allocations it did. It will also warn you about common errors like using uninitialized memory, dereferencing pointers to strange places, writing off the end of blocks allocated using malloc, or failing to free blocks.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents