I wanted to check that my code was not leaking memory, so I built that latest version of valgrind from source on my TX2 system:
and ran it on the sample code in 01_video_encode.
Here is the summary:
==14832== HEAP SUMMARY:
==14832== in use at exit: 86,855 bytes in 45 blocks
==14832== total heap usage: 2,903 allocs, 2,858 frees, 7,925,054 bytes allocated
I am attaching the full valgrind log file for your reference as well as the commands I used to generate it.
Please advise on how to resolve these leaks in the Multimedia API.
If you want to see the same result in valgrind you will need to update the makefile to include the CPPFLAGS I listed above. Then you can build example “01_video_encode”.
You will need a .yuv raw video file to use as an input for the app.
5.2. With Memcheck’s memory leak detector, what’s the difference between “definitely lost”, “indirectly lost”, “possibly lost”, “still reachable”, and “suppressed”?
The details are in the Memcheck section of the user manual.
In short:
• “definitely lost” means your program is leaking memory – fix those leaks!
• “indirectly lost” means your program is leaking memory in a pointer-based structure. (E.g. if the root node of a binary tree is “definitely lost”, all the children will be “indirectly lost”.) If you fix the “definitely lost” leaks, the “indirectly lost” leaks should go away.
• “possibly lost” means your program is leaking memory, unless you’re doing unusual things with pointers that could cause them to point into the middle of an allocated block; see the user manual for some possible causes. Use --show-possibly-lost=no if you don’t want to see these reports.
• “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.
• “suppressed” means that a leak error has been suppressed. There are some suppressions in the default suppression files. You can ignore suppressed errors.
Hi Ceres,
Do you mean this the memory leakage?
==10674== still reachable: 85,457 bytes in 40 blocks → I think THis is the memory from nvmap, not memory leakage.