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

  • Home
  • SEARCH
  • 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 275845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:49:49+00:00 2026-05-12T00:49:49+00:00

When my task manager (top, ps, taskmgr.exe, or Finder) says that a process is

  • 0

When my task manager (top, ps, taskmgr.exe, or Finder) says that a process is using XXX KB of memory, what exactly is it counting, and how does it get updated?

In terms of memory allocation, does an application written in C++ “appear” different to an operating system from an application that runs as a virtual machine (managed code like .NET or Java)?

And finally, if memory is so transparent – why is garbage collection not a function-of or service-provided-by the operating system?


As it turns out, what I was really interested in asking is WHY the operating system could not do garbage collection and defrag memory space – which I see as a step above “simply” allocating address space to processes.

These answers help a lot! Thanks!

  • 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-12T00:49:49+00:00Added an answer on May 12, 2026 at 12:49 am

    This is a big topic that I can’t hope to adequately answer in a single answer here. I recommend picking up a copy of Windows Internals, it’s an invaluable resource. Eric Lippert had a recent blog post that is a good description of how you can view memory allocated by the OS.

    Memory that a process is using is basically just address space that is reserved by the operating system that may be backed by physical memory, the page file, or a file. This is the same whether it is a managed application or a native application. When the process exits, the operating system deletes the memory that it had allocated for it – the virtual address space is simply deleted and the page file or physical memory backings are free for other processes to use. This is all the OS really maintains – mappings of address space to some physical resource. The mappings can shift as processes demand more memory or are idle – physical memory contents can be shifted to disk and vice versa by the OS to meet demand.

    What a process is using according to those tools can actually mean one of several things – it can be total address space allocated, total memory allocated (page file + physical memory) or memory a process is actually using that is resident in memory. Task Manager has a separate column for each of these possibilities.

    The OS can’t do garbage collection since it has no insight into what that memory actually contains – it just sees allocated pages of memory, it doesn’t see objects which may or may not be referenced.

    Whereas the OS handles allocates at the virtual address level, in the process itself there are other memory managers which take these large, page-sized chunks and break them up into something useful for the application to use. Windows will return memory allocated in 64k boundaries, but then the heap manager breaks it up into smaller chunks for use by each individual allocation done by the program via new. In .Net applications, the CLR will hand off new objects off of the garbage collected heap and when that heap reaches its limits, will perform garbage collection.

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

Sidebar

Ask A Question

Stats

  • Questions 183k
  • Answers 183k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The best and most important thing you can do is… May 12, 2026 at 4:33 pm
  • Editorial Team
    Editorial Team added an answer if you have access to support, this looks like bug… May 12, 2026 at 4:33 pm
  • Editorial Team
    Editorial Team added an answer In Linux you can use procfs: >>> os.readlink('/proc/%d/exe' % os.getppid())… May 12, 2026 at 4:33 pm

Related Questions

I have a problem very similar to the one described here: https://microsoft.public.win32.programmer.kernel.narkive.com/Ly2P8Yp2/prevent-vista-from-marking-my-application-as-non-responding That thread
I got a bit of a problem. Related to my earlier questions about Slipstreamed
I am using 32 bit RHEL 4.4 on AMD64 based hardware. Here is the
So I've got an application whose window behavior I would like to behave more

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.