memory allocated bis

Here is an exact description of my problem :

I am writing a dll. I am using opencascade from that dll only. LoadLibrary and FreeLibrary on my dll can be called many times by the main application.

For the moment, every time my dll is loaded and then freed by the application I see from the task manager that the 'total commit charge' gets bigger and bigger. (the chart named 'memory usage history' in the task manager goes up then down a little every time but globally goes up).

BUT ANYWAY, when I look at the 'processes' tab in the NT task manager, the mem usage of the main application remains the same after a load and free of my dll.

Shoud I worry about the commit charge and that 'memory usage' chart that looks like a stair ?

Still waiting for your advice...


Mikael Aronsson's picture

Hi !

Does the commit charge goes up all the time and never stops ?, in that case you should worry a bit.

If it does stop after a while, then it's no problem, the memory manager can commit lots of memory a number of times without problems, this is very common, and remember that part of the commit charge may exist in the swap space.

So as long as it does not grow for ever it should not be a problem.

Oh, by the way, the commit charge does not go down at the moment you unload the dll, it can take a while before it thrinks again.