为什么Process.PrivateMemorySize64/1024与Windows Task Manager内存(私有工作集)不匹配? [英] Why does Process.PrivateMemorySize64 /1024 not match what Windows Task Manager Memory (Private Working Set)?

查看:641
本文介绍了为什么Process.PrivateMemorySize64/1024与Windows Task Manager内存(私有工作集)不匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Process.PrivateMemorySize64 /1024与Windows任务管理器的内存(私有工作集)不匹配?

Why does Process.PrivateMemorySize64 /1024 not match what Windows Task Manager Memory (Private Working Set)?

似乎有很大的差异(〜30%).另外,该值不会像任务管理器那样频繁更新.

There seems to be a big (~ 30%) difference. Plus the value doesn't update frequently like task manager.

呼叫_process.Refresh()没有帮助.

推荐答案

您正在寻找不同的东西.

You are looking at different things.

Process类的PrivateMemorySize64属性等效于Private Bytes性能计数器.它表示分配给关联进程的私有内存总量,无法与其他进程共享.专用字节不仅是物理内存,而且还是分页文件等.

The PrivateMemorySize64 property from the Process class is the equivalent of the Private Bytes performance counter. It represents the total amount of private memory allocated for the associated process that cannot be shared with other processes. Private bytes are not only physical memory, but also paged files etc.

另一方面,私有工作集跟踪上面的私有字节的一个子集,该子集仅表示一个进程正在使用的物理内存,不能与其他进程共享.

On the other end the Private Working Set tracks a subset of the private bytes above, which represents only the physical memory that a process is using and can't be shared with other processes.

这篇关于为什么Process.PrivateMemorySize64/1024与Windows Task Manager内存(私有工作集)不匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆