0Pricing
C Academy · Lesson

Reading Reports

Interpret output.

Anatomy Of A Report

A Valgrind report has three parts:

  • The process ID prefix on every line
  • One or more error blocks as they occur
  • A final HEAP and LEAK SUMMARY at exit

Learning to read each part turns a wall of text into a precise to-do list.

The PID Prefix

Every Valgrind line starts with ==PID==, for example ==12345==.

This is the process ID, not part of your program's output. It lets you separate Valgrind's messages from your program's printf when both share the terminal.

==12345== Memcheck, a memory error detector
==12345== Command: ./prog
==12345==

All lessons in this course

  1. Why Valgrind
  2. Detecting Leaks
  3. Invalid Access
  4. Reading Reports
← Back to C Academy