Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.
Why you run out of memory
Published on September 2, 2007 By Draginol In GalCiv Journals

32-bit gaming is going to come to an end.  Not today. Not tomorrow, but a lot sooner than most people think.

That's because no matter how much memory your PC has, no matter how much virtual memory you have, a given process on a 32-bit Windows machine only gets 2 gigabytes of memory (if the OS had been better designed, it would have been 4 gigs but that's another story).

Occasionally you run into people in the forums who say "I got an out of memory error".  And for months we couldn't figure it out.  We don't have any memory leaks that we know of and the people who reported it had plenty of virtual memory.  So what was the deal?

The problem was a basic misunderstanding on how memory in Windows is managed.  We (myself included) thought that each process in Windows may only get 2 gigabytes of memory but if it ran out of that memory, it would simply swap to the disk drive.  Thus, if a user had a large enough page file, no problem.  But that's not how it works.  After 2 gigabytes of memory, the system simply won't allocate the process any more memory. It simply fails and you will end up with a crashed game.

This is a very significant problem.  In Galactic Civilizations II v1.7, we'll at least be able to address this with more aggressive dealocation routines (which I really hate having to do, I really prefer the idea of once something is used, to keep it around for performance -- I've always been a proponent of performance over memory use).  But we'll be able to do it here without any noticeable affect in performance.

No, the real problem is in future games. If 2 gigabytes is the limit and a relatively low impact game like Galactic Civilizations is already running into it (and it's no memory hog), what's coming up next?  How about this -- when your video card runs out of memory for textures, it goes to system memory. And I think (but haven't tested this) that the memory it grabs belongs to the game process. 

Console game developers would simply laugh at our complaints and say that we just need to get better at de-allocating memory.  But that's only a short-term solution.  Gamers, particularly PC gamers, want to see their games get better looking and more sophisticated. 

So at some point, in the next few years, serious gamers and high-end games are going to have to require 64-bit machines to play them.  It'll probably be several years before it becomes common but it's coming. 

The good short-term news for GalCiv players is that we'll be able to have larger sized galaxies in GalCiv II: Twilight of the Arnor without running out of memory and users of GalCiv II will be able to avoid running out of memory once they get v1.7.


Comments (Page 4)
4 PagesFirst 2 3 4 
on Oct 05, 2007
Perhaps future games can be engineered as multiple cooperative processes, each with its own memory space.
on Oct 05, 2007
Microsoft missed an opportunity with Vista to encourage 64 bit.

64-bit driver support was always going to be an issue but MS put fuel on the fire by refusing to allow unsigned drivers to be loaded (yes, there is a walk-around but it is cumbersome)

Not being able to run 16-bit applications is also a concern.
4 PagesFirst 2 3 4