VB.NET memory usage / virtual memory size (big difference)

Posted on 2008-11-03
Last Modified: 2012-06-21
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.
Question by:mcainc
    LVL 3

    Expert Comment

    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.
    LVL 3

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now