CpSc 416/616 -- 2D Game Construction

Memory Leaks -- using Valgrind

Examples:

  • Program with Leaks
  • Fixed Program
  • What's the diff between "definitely lost", "possibly lost", "still reachable"?
    • Link to Vagrind FAQ
    • "definitely lost" means your program is leaking memory -- fix it!
    • "possibly lost" means your program is probably leaking memory, unless you're doing funny things with pointers.
    • "still reachable" means your program is probably ok -- it didn't free some memory it could have. This is quite common and often reasonable. Don't use --show-reachable=yes if you don't want to see these reports.


Valid HTML 4.01! Valid CSS!
Send comments to Brian
Last updated on 24 August 2005