Programmer's understanding of Memory in the Vista Windows Task Manager

蓝咒 提交于 2019-12-04 04:10:36

This MSDN blog entry might be informative on the first part of the question. A brief excerpt:

Working set is the subset of virtual pages that are resident in physical memory only; this will be a partial amount of pages from that process.

As discussed in the article, the part about private versus not-private has to do with memory used by the process that can be shared by other processes. If you can't share the memory (perhaps the memory is used by the image of a DLL had to be relocated in memory), it becomes private. Heap memory is also always going to be private.

The reason you see the memory drop dramatically when minimizing a program is that Windows automatically trims the working set of a process whenever it its main window is minimized. See this Microsoft KB article for more, including instructions on how to do this yourself.

The paged pool and non-paged pool memory refers to kernel memory used by the process. Memory from the paged pool can be paged out (removed from physical memory when memory pressure increases). Memory from the non-paged pool will always remain in physical memory, so generally it's preferable for this to stay small. Unless you're writing device drivers, though, as a user-mode application developer you generally won't need to worry about these two items.

Vista's SuperFetch considers free memory to be wasted memory. Better is using it like a cache. This is why you will often see scant free memory in the Task Manager.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!