mcainc
asked on
VB.NET memory usage / virtual memory size (big difference)
I have an application that has 100's of threads in it of the same object...
According to the task manager:
Mem Usage = 231,260K
VM Size = 1,008,692K
This is a big difference & seems quite high.. is this normal? It can't need this much memory to run...
I also notice that when I minimize the program, "Mem Usage" goes down to around 30M and slowly crawls back up but VM Size remains the same.
I find it hard to believe my application needs this much memory to run, maybe I'm wrong...
Does .NET allocate extra memory it may never use? I'm worried about a VM error down the road the way this thing is hogging resources.
According to the task manager:
Mem Usage = 231,260K
VM Size = 1,008,692K
This is a big difference & seems quite high.. is this normal? It can't need this much memory to run...
I also notice that when I minimize the program, "Mem Usage" goes down to around 30M and slowly crawls back up but VM Size remains the same.
I find it hard to believe my application needs this much memory to run, maybe I'm wrong...
Does .NET allocate extra memory it may never use? I'm worried about a VM error down the road the way this thing is hogging resources.
There is a term "Working Set". When application is working and not minimized .NET CLR allocate some memory, but when application is minimized then memory is deallocated. You may use System.Diagnostics.Process .WorkingSe t64 to see how much is it, and MaxWorkingSet and MinWorkingSet properites to control the working set.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.