什么导致页面错误以及如何最小化它们? [英] What causes page fault and how to minimize them?

查看:40
本文介绍了什么导致页面错误以及如何最小化它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Process Explorer 中检查进程时,这意味着什么当有几个页面错误时?该应用程序正在处理相当多的数据,并且 UI 响应速度不快.是否有可以减少或消除页面错误的代码优化?增加系统的物理内存会有所不同吗?

解决方案

http://en.wikipedia.org/wiki/Page_fault

增加机器上的物理 RAM 可以减少页面错误,尽管对应用程序进行设计更改会比添加 RAM 好得多.一般来说,拥有较小的内存占用,并且在同一页上经常访问的内容会减少页面错误的数量.尝试对内存中的一些数据一次性执行所有操作也很有帮助,这样您就不需要多次访问它,这可能会导致页面错误(也称为抖动).

When examining a process in Process Explorer, what does it mean when there are several page faults? The application is processing quite a bit of data and the UI is not very responsive. Are there optimizations to the code that could reduce or eliminate page faults? Would increasing the physical RAM of the system make a difference?

解决方案

http://en.wikipedia.org/wiki/Page_fault

Increasing the physical RAM on your machine could result in fewer page faults, although design changes to your application will do much better than adding RAM. In general, having a smaller memory footprint, and having things that will often be accessed around the same time be on the same page will decrease the number of page faults. It can, also, be helpful to try to do everything you can with some bit of data in memory all at once so that you don't need to access it many different times, which may cause page faults (aka thrashing).

这篇关于什么导致页面错误以及如何最小化它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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