Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


what causes page files? etc

This topic is 6905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Welp, I used Spy++ and noticed that over three minutes my program racked up a little over 35,000 page faults. What could be causing these page faults? I assume they hurt performance slightly, so I'm wondering. In addition to what could be causing them, I am also wondering what can be done to eliminate them. IE5 has been running for over an hour and only has about 15k of them. Help help

Share this post

Link to post
Share on other sites
Well, generally speaking, a page fault occurs when your program tries to access memory (code or data) that has been swapped out to disk for whatever reason. This results either when your program requires more memory than your system has, or if you're running other programs and their combined memory requirements are greater than your total amount of RAM.

It is a costly process to swap pages in and out, especially for games. High swapping is usually a result of poor design/coding (no offense intended, we all to it to some degree). To minimize them, firstly try to slim down your code. Smaller code is better anyways. Also, something that is somewhat of a lost art on the PC, conserve on memory and structure sizes. Try to allocate things all at once, or if using a 'cache' approach, allocate one big block and manage it yourself for each cache of memory. Doing memory allocation in a willy-nilly approach results in memory fragmentation, which can easily result in more pages of memory used than are truly needed.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!