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 6147049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:02:51+00:00 2026-05-23T19:02:51+00:00

I’m asking this question for posterity reasons and general interest. Years ago I noticed

  • 0

I’m asking this question for posterity reasons and general interest. Years ago I noticed an odd behavior within Windows. I know this works in XP and at that time it also worked in Windows 2000 and even 98 and I’d assume this behavior still works for Windows 7.

To setup my question, try this experiment by following these steps.

  1. Open the Task Manager and navigate to the Processes tab.
  2. Open an application that you use that you know consumes a fair amount of memory (a web browser should work fine) and find the process in the Task Manager.
  3. Now use the application by opening windows, documents, web pages, etc. until the Memory Usage of your application grows significantly.
  4. Make note of the applications Memory Usage and minimize the application– you should see a significant reduction in the amount of memory that the application is using.
  5. Finally, restore the application.

After restoring the Window, you should that that the Memory Usage of the application should spike a little but no where near as much as it was before you minimized the application. This is quite consistent with any GUI based application but it is certainly more profound with larger applications.

QUESTION

Internally within the OS, what process is taking place that forces this (assumed) garbage collection to take place? Furthermore, via COM or some .Net calls is there a way to force this process without minimizing an application? If so, please provide source code. The language doesn’t matter.

If you are like me, you may keep a lot of applications open at the same time. Memory usage can creep up… up… up.. and before you know it, you need to close a few applications to free resources. It would be nice if I could at least integrate into the software that I have control a mechanism to force garbage collection from the OS similar to the behavior from the exercise above.

I know that in .Net there is a GC object and you can call the garbage clean-up as you desire. It does not, however, seem to be related with the nature of the memory clean-up that happens when an application is minimized.

I hope this is a head scratcher and that after years of curiosity that someone- can give me a good, technical explanation of what is going on.

Page Files and Going Further Down the “Rabbit Hole”

Interesting stuff has been posted as an answer to this question by Kragen & Alex K. Upon reading the Knowledge Base article they both posted, I see that there is also a way to prevent this behavior from happening. What are some examples of when you would want to prevent this paging freeing from taking place? I’m trying to read through the documentation to learn as much about this as I can. A lot of this information is new to me because I’ve never needed to implement any of this within .Net applications. Considering a use-case would help me grasp the reasoning of why and when I would want to avoid this behavior.

  • 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-23T19:02:52+00:00Added an answer on May 23, 2026 at 7:02 pm

    The process you are seeing is not garbage collection – Windows is “trimming the working set” (i.e. paging as much memory as it can to disk) in order to free up memory for foreground applications.

    See the following links for more information:

    • The working set of an application is trimmed when its top-level window is minimized (KB)
    • SetProcessWorkingSetSize Function

    The KB article linked above describes both how you can prevent this from automatically happening (by intercepting the WM_SYSCOMMAND command), and how you can explicitly cause this to happen at any time (by calling SetProcessWorkingSetSize).

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question

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.