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.
mcaincAsked:
Who is Participating?
 
ASliborskyConnect With a Mentor Commented:
0
 
ASliborskyCommented:
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.WorkingSet64 to see how much is it, and MaxWorkingSet and MinWorkingSet properites to control the working set.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.