Skip to content

Instantly share code, notes, and snippets.

@smamran
Created November 15, 2015 04:32
Show Gist options
  • Select an option

  • Save smamran/5add14efa34b58faf6f3 to your computer and use it in GitHub Desktop.

Select an option

Save smamran/5add14efa34b58faf6f3 to your computer and use it in GitHub Desktop.
Valgrind Memory Leak Checker in C
########## Install Valgrind ##################
wget http://www.valgrind.org/downloads/valgrind-3.11.0.tar.bz2
bzip2 -d valgrind-3.11.0.tar.bz2
tar -xf valgrind-3.11.0.tar
cd valgrind-3.11.0
./configure
sudo make
sudo make install
########## Memory Check ##################
valgrind --tool=memcheck --leak-check=yes ./mempro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment