Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:29:17+00:00 2026-05-27T03:29:17+00:00

Here are the stats for my program after it used memory extremely intensively, consuming

  • 0

Here are the stats for my program after it used memory extremely intensively, consuming 6 GB at its peak, but then saving everything to disk and leaving very little in scope:

Screenshot

Observe that almost everything has gone out of scope and has been garbage collected – the heap sizes are tiny. And yet, .NET keeps 181 MB committed.

I don’t mind the reserved bytes, since that only consumes address space. But the committed memory is annoying – even if it only resides in the page file, it’s still quite a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:29:17+00:00Added an answer on May 27, 2026 at 3:29 am

    According to CLR Inside Out – Large Object Heap Uncovered the CLR decommits un-used committed memory during a Gen 2 garbage collection.

    This means that you can either wait for a Gen 2 garbage collection to happen on its own or you can force one using GC.Collect() – you really need to know what you are doing if you choose this route however as it messes with the garbage collectors standard garbage collection cycles which can really mess with performance:

    • A full garbage collection is slow so you really don’t want to do this too often
    • Triggering garbage collections more frequently than the standard schedule will promote additional objects to higher generations meaning they might not be collected as soon as they would normally be

    As far as I am aware (from my fairly limited research) the CLR won’t release committed memory in other situations.

    You should also consider whether or not this is actually a problem:

    • If your process is going to immediately go on to perform additional memory-intensive processing then it will need that memory again fairly soon and so there isn’t a huge amount of benefit of decommitting that memory anyway
    • If you process is done and will terminate shortly then the memory will be decommited anyway
    • There isn’t necessarily going to be a large disadvantage to having that much memory committed anyway – yes it means that the memory has a backing store allocated, however if the system is under memory pressure then that backing store is likely to be a page file anyway.

    Update: Advanced .NET Debugging: Managed Heap and Garbage Collection appears to back up the hypothesis that memory is only uncommitted during a gen 2 / full collection:

    When objects in generation 2 are collected, the CLR heap manager decommits memory in the segments, and when a segment is no longer needed, it is entirely freed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a fairly simple program that's used for creating backups. I'm attempting to
I have a program here: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/ipc.h> #include
At one point I wrote a packet capture program in haskell and it used
here are some quotes from the dev reference that after reading can't get my
The problem is that the program throws an exception. After creating multiple threads. How
I heard that ASP.net MVC does not maintain View State.So,here is my question I
Here are the ways the Eclipse documentation states you can navigate the Content Assist
Here it is Create a thread in suspended state. hThrd1 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)
here's the method: public static int chooseStrat () { String[] strats = new String[1]
Here's an example: >git status # On branch master nothing to commit (working directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.