The Great Memory Leak Hunt

A few weeks back I upgraded the sim software to Prepare3d 3.2, and as I posted here it generally went great but did create a few issues, one of which was a memory leak leading to out of memory errors (known as a OOM in the sim community). For those who are new to this, both Prepar3d and Flight Simulator X are 32-bit programs, meaning they are written for platforms from the first generations of powerful desktop PCs (which had 32-bit architectures). At some point this is too much inside baseball, but the important thing is that because these programs run on a legacy set of code that’s more than 10 years old, they can only access a total of about 4 gig of RAM (called VAS, for “virtual address space”). So even though my PC has 16 gig of fast memory available, the sim can only get to a portion of it.

As the sim loads scenery, other aircraft, clouds, etc., it fills that memory up, and at some point there’s not enough left for it to run and the software crashes. FSX historically isn’t great at freeing up new memory as you fly over new terrain and the old terrain is not longer visible. P3D is better. But with both, OOM errors can happen when you have lots of complex scenery, aircraft, and add-ons, so you want to preserve your available VAS memory as best you can.

Which is why the memory leak I had after the upgrade was a big deal – it was chewing through my VAS at an alarming rate, even as I was just sitting on the tarmac. At first I thought Active Sky Next was the issue, but a re-install of that seemed to run ok. Then I thought it was Multi Crew Experience, an add-on I use to talk to the computer ATC in my own voice (and that I really love). MCE runs outside of the sim software, so it shouldn’t eat VAS, but it’s in the mix so I’m looking at it. I’ve since re-installed both, and done a full reinstallation of P3D. The VAS usage is better, but still not as good as it should be, and it seems to be worse with MCE running. I’m going to spend some time this morning taking out add-on scenery, aircraft, and the rest, and then adding them back one-by-one to find out what the issue is. I’ll report here when I have it cracked.

In the meantime, there’s a good thread on VAS / OOM management here for those who want to learn more.

Leave a Reply