Windows的working set

在研究进程performance问题时,碰到process working set的疑惑。结论是process working set是指进程空间中当前存在于物理内存(RAM)中的那部分。当出现page faul,而内存又充足时,会在RAM中分配物理内存页给当前进程。windows的memory mgt负责这块。如果内存充足,process working set不会trim。

但是,如果process working set值不断增大,可能有内存泄露。当然,个人认为,判断memory leak的最可靠标识,还是监控virtual memory size。

《Microsoft Windows Internals》第四版里面的有小节讲的很清楚:

cited from <Microsoft WIndows Internal, Fourth Edition>:

Working Set Management

Every process starts with a default working set minimum of 50 pages and a working set maximum of 345 pages. Although it has little effect, you can change the process working set limits with the Windows SetProcessWorkingSetSize function, though you must have the "increase scheduling priority" user right to do this. However, unless you have configured the process to use hard working set limits (new in Windows Server 2003), these limits are ignored, in that the memory manager will permit a process to grow beyond its maximum if it is paging heavily and there is ample memory (and conversely, the memory manage

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值