c++memory-leaksvalgrindmemcheck

What do the number of contexts in valgrind leak summary refer to?


I was profiling a c++ application using valgrind. In the leak summary, the number of errors is different from the number of contexts. What do contexts mean?

`ERROR SUMMARY: 44911 errors from 1070 contexts (suppressed: 0 from 0)`

Why are the number of errors different from the number of contexts in this case?


Solution

  • context referes to the call stacks that lead to an error. To put it simple: that many places in the code cause errors.