My application runs for few hours, There is no increase in any value ( vmsize, memory) of Task Manager. But after few hours i get out of memory errors.
In sysinternals i see that "Virtual Size" is contineously increasing, and when it reach around 2 GB i start getting memory errors.
So what kind of memory leak is that ? How can i demonstrate it with a code ? Is it possible to reproduce same thing with any piece of code where none of the memory value increase but only the Virtual Size in sysinternsl process explorer increase ?
thanks for any suggestions
Virtual size is the number of pages that the process has allocated, those pages not currently in the working set (physically loaded in RAM) will be in the system's page file.
Typically you allocate memory that is not freed. This can be difficult to track down in the code without special tools like Rational Purify or Boundschecker for example. With sysinternals you see that there must be leak but it won't by no mean tell you where...
If your software is not so big you can try to log out the "new" and "delete" and see if there are too many objects in memory by managing lists of allocated objects (making your own memory debugger so to say). There are some helpers in the windows world like the CRT memory checking utils from Microsoft. They are useful in some cases.