Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding valgrind output loss record

Tags:

valgrind

When I run valgrind on my process and after process exit I get below output. What is the meaning of "loss record 33,118 of 34,156"

==4215== 2,048 bytes in 128 blocks are definitely lost in loss record 33,118 of 34,156

like image 824
Sirish Avatar asked Sep 11 '25 06:09

Sirish


1 Answers

It means the 33118th loss record of total 34156 records.

As described in Memory leak detection section of Valgrind documentation,

... it merges results for all blocks that have the same leak kind and sufficiently similar stack traces into a single "loss record".
... The loss records are not presented in any notable order, so the loss record numbers aren't particularly meaningful. The loss record numbers can be used in the Valgrind gdbserver to list the addresses of the leaked blocks and/or give more details about how a block is still reachable.

like image 155
timrau Avatar answered Sep 13 '25 18:09

timrau