jemnotesversion 2 / featuring this entry or see all/search

Aug 21
Check for common memory errors in C with valgrind. Also profile cache misses and branch mispredictions.
Sample usage:
# Check memory accesses.
valgrind --tool=memcheck ./prog

# View cache and branch profiling information.
valgrind --tool=cachegrind ./prog
For more detailed output from valgrind, add the -g tag to your gcc compilation flags to add debugging information to the binary.