I have a .NET WPF application that uses a C++/CLI library we wrote to control video via Microsoft Media Foundation libraries.
When monitoring the private bytes performance counter on various devices this counter remains steady over a period of weeks. However on a system with Intel GMA3650 graphics this performance counter increases at a noticeable and steady rate when the application is running (playing video). If I disable Aero by switching to the Windows 7 Basic theme this counter is noticebly better albeit with slight and steady increase stll.
The C++/CLI code is mainly doing basic video transport control functions as well as adding/removing video segments from a sequence. It also takes a snapshot of the current video via IMFSourceReader::ReadSample
.
It looks like this driver is causing a memory leak in my application but I'm not even sure if that's possible. Are all applications vulnerable to memory leaks in any underlying operating system libraries or libraries used by the OS in execution of the application?
Any piece of software which can allocate memory in your processes virtual address space is capable of causing a memory leak. Drivers can allocate memory in such a way through functions like ZwOpenSection
. Hence they can cause a process to leak memory
Now just because it can leak memory doesn't mean it does leak memory. It's far more likely that there is a bug in your application. The first step is to profile and figure out what memory is leaking and move on from there