I have a simple application which uses ffmpeg for decoding.
Usually it works just fine. However, when I try to play a certain file its starts eating up my memory. Even when I release all resource used by the decoder the memory is not freed.
I have tried running a memory leak detector (intel parallel inspector), but it doesn’t detect the leak as the memory is probably release during shutdown.
My question is how can I see where and how much memory has been allocated during runtime?
EDIT: Added windows tag.
Use the CRT memory leak reporting functionality, if you can run your application with the debug CRT.
The debug CRT tracks your allocations and can tell you where memory is leaking when the application exits. One thing to keep in mind is that in order to use this approach, you have to ensure that all resources are cleaned up before exiting the main function, otherwise they will be reported as leaks.
Details here http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx.
If this doesn’t find any leaks, I would suggest letting your program run for a few hours and checking if there’s an upper limit on how much memory it can use; it may not be a leak.