Learn C The Hard Way

If you have issues installing Valgrind on Mac OSX try install the Xcode Command Line tools. You can do it running this command in your terminal xcode-select --install