Install: sudo apt-get install valgrind
From: http://www.jianshu.com/p/6f03a0cfe60c
C ++ test procedure: Catch and use Valgrind
Note: All things belong to the bottom, will be placed under the Magic C.
Under Linux use Valgrind memory leak detection tools and performance analysis
http://www.linuxidc.com/Linux/2012-06/63754.htm