Saturday, June 26, 2010

Fix FSX out of memory (oom) errors

I recently installed some addons that were using high definition textures in Flight Simulator X and I was getting constant oom errors.

The symptoms of FSX running out of memory were autogen spikes from the ground till the sky, blue or untextured polygons on the ground, gauges that kept freezing and very bad framerate. After these signs started to appear it was impossible to continue to play. Sometimes FSX crashed and gave an out of memory error.

My problem proved to be not the actual size of the memory (in my case 2GB of RAM and 1GB of video memory), but actually the way Windows was allocating that memory, in this case the VAS (Virtual adress space) which is the same size no matter how big the memory is. In some cases FSX needs more than it can access from the VAS. By default FSX uses up to 2GB of the VAS, while the rest remains available to the system. In some cases this is not enough for all the complex addons in FSX.

There is a way to increase the maximum available VAS for any application, incl. FSX. More details about this and the method to fix it can be found here.

Below the method to do it:
 For XP:
  • Disable hidden files and folder.
  • On the root C:\ you will find a file named: boot.ini
  • Open boot.ini in notepad and add the following to the end of the OS boot line:

like in example below:

multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows XP Professsional" /fastdetect /3GB /Userva=2560
  • Save and close the file;
  • Reboot;
To set that back to default, simply remove the edit you made above.

Windows Vista/ Windows 7
BCDEDIT /set increaseuserva 2560


BCDEDIT /set increaseuserva 3072

It is possible to starve the operating system's slice of VAS to the point that your system will no longer boot!

If this happens, you must reboot the computer into "Safe Mode" (which bypasses the /3GB switch, and then edit your boot.ini (WinXP) or use bcdecit (Vista/7) to reduce the size of the application slice of the VAS.
Do not try this method if you don't have enough computer skills to do repair it in case something goes wrong. Use it on your own risk.


SimMiles Corporation said...

Yeah that happens to me all of the time too.

Virtual Airlines
Virtual Airline Hosting
Flight Simulator X

Tuddley3 said...

What is the maximum you can set userva=xxxx? I have XP Home if that makes a differance.

building materials said...

Some of the addons in FSX are real memory hoggers. I have decided to upgrade to Windows 7 64 bit and get the usage of extra ram. I will give this a go on XP. Good luck with the photoreal scenery. I have just started a small blog looking at some of the best freeware for Fsx here Best Freeware FSX

Check out the Christchurch Newzealand photoreal. It is some of the best that I have seen.