O'Reilly logo

Mastering C++ Programming by Jeganathan Swaminathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Memcheck tool

The default tool that Valgrind uses is Memcheck.  The Memcheck tool can detect quite an exhaustive list of issues, and some of them are as follows:

  • Accessing outside the boundary of array, stack, or heap overruns
  • Use of uninitialized memory
  • Accessing the already released memory 
  • Memory leaks
  • Mismatched use of new and free or malloc and delete

Let's have a look at some such issues in the next subsections.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required