ITPub博客

首页 > Linux操作系统 > Linux操作系统 > windows进程的虚拟内存为何比内存使用少?

windows进程的虚拟内存为何比内存使用少?

原创 Linux操作系统 作者:davidyu720 时间:2019-07-10 10:03:06 0 删除 编辑

在WINDOWS下是用taskmgr的“进程”页面上来查看进程的内存和虚拟内存的占用。可以查看“内存使用”和“虚拟内存大小”两列。

Q: 在tskmgr中显示,一个进程的虚拟内存为何比内存使用少?
系统提交更改(认可用量:总数):Page+Physical 最小化程序后,进程内存使用一般会减少,但系统提交更改保持不变
"内存使用": Physical Memory:Working Set
"虚拟内存": Virtual Memory:Private Bytes

在研究你的进程的内存使用或内存泄漏情况时,最有用的是process:private bytes and process:virtual bytes这2个performance counter。
Working set这个counter 只是指进程目前还在RAM里的memory而已。如果要用Task Manager看的话,那么也要看Virtual Memory Size 一列。

Virtual Memory
Private Bytes "虚拟内存" MEM_COMMIT
Virtual Size "虚拟内存" MEM_COMMIT && MEM_RESERVE
Physical Memory
Working Set "内存使用"

Task Manager有另一列数据:VM Size,表示了一个进程分配的虚存(Committed Virtual Memory)——实际的定义要比这个复杂一些
http://en.wikipedia.org/wiki/Commit_charge


The "Mem Usage" column in Task Manager's "Processes" display shows each process's current working set. This is a count of physical memory (RAM) rather than virtual address space. It represents the subset of the process's virtual address space that is valid, meaning that it can be referenced without incurring a page fault.

The commit charge for each process does not include other major contributions to the process's virtual address space, such as mapped files. For this reason, the process's working set may be larger than its "VM size" (its contribution to "total commit charge"), and the total commit charge is not at all inclusive of the total memory (physical plus virtual) actually in use.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9844649/viewspace-580133/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-08-18

  • 博文量
    235
  • 访问量
    180875