Memory Leak

The czar

Chieftain
Joined
Oct 25, 2005
Messages
9
Is it at all confirmed that Civ4 does have a memory leak, and is it for all Civ 4 players (of different setups)? I wonder because the game seems to get slower during the modern age, and I dont know if this is because there is alot more to display on the screen, or there is a memory leak.
 
The czar said:
Is it at all confirmed that Civ4 does have a memory leak, and is it for all Civ 4 players (of different setups)? I wonder because the game seems to get slower during the modern age, and I dont know if this is because there is alot more to display on the screen, or there is a memory leak.
Easy way to check is to save and exit the game, reload and see if its improved.
 
Darn straight there's a memory leak, unless Civ 4 is supposed to use 400+ Megs of memory...

Considering I only saw that after a marathon gaming session on normal, and that the memory consumption was more than an order of magnitude higher than all my other programs, memory leak is a safe bet.
 
It uses ridiculous amounts of memory (in fact it seems allways to use a bit more then the pc has ;) at least up to 2 GB) but i dont think it's a memory leak, since restarting the game does not make it better...
 
In my case memory usage does not grow beyond 524Mb (but with my 512Mb RAM it's pain in the ass to play). I think it's not a memory leak, but a HUUUUGE overhead. And it's bad, because fixing this takes a lot of time if ever gets fixed (actually recoding engine). I think hardware will reach 2Gb-usual-RAM earlier then this upgrade (not a fix) comes out. I want to be wrong...
 
I played a game with only 5 civs on a large map . page file was using 1.8 gigs
 
ainwood said:
Easy way to check is to save and exit the game, reload and see if its improved.
Yep. I regularly save my game and after a few hours exit and rest and then come back.
 
I fixed my crashing to desktop problems by increasing my vitrual mem to 2gig and running a smaller map, so far i've researched all techs and explored the whole map without crashing a total of 5 hours so far
 
I am not experiencing any memory leaks or crashes or memory usage above 350 or so MB maximum, and I only have 512 MB of RAM. But I haven't played on anything other than standard-sized normal-speed continents maps.
 
i hit ~750 megs playing the 18-civ world map. That was not fun. But as long as i have graphics on med., keep to standard-size maps with 6 or less civs, its actually pretty quick. Im still going to upgrade my mem to 1.5GB so that i can play the huge maps :).
 
I think that the main source of the problem (that huge memory leak) is not exactly the leak. It looks there's bug in Civ4 that causes some damage to its internal game data and this damage is getting stored in saved games. There's a bunch of symptoms to confirm that.

Occasionally, save game size is in megabytes, while normally it's only around 100k. Those megabytes large save games can't be loaded - Civ4 crashes when loading them. Civ will occasionally crash right after saving the game (in these cases I always observed megabytes large save file as a result).

Another interesting observation to suggest that. I have saved the game (tiny map, late game) and Civ4 crashed couple of turns later. I've reloaded and Civ4 took around 720Mb of RAM right after reload (I have total of 768Mb). It was pointless to try to play in this conditions, so I've saved the game, quit and reloaded new save game. Now Civ4 took only 220Mb. (Usually it takes around 100Mb to get to the main menu and another 120Mb go to restore the game). In perfect world, both save games and the state after the reload should have been identical, but they're not. So it looks that saving code of Civ4 has some bug that causes the damage to memory and/or data. And depending on what and how get damaged the game either crashes or slow downs horribly because it allocates huge amount of memory and has to use swap file.
 
I also have been having problems with saved games. They load slow and then the first couple of turns are extremely slow. Once it gets past a few turns the game speeds back up to normal.

I have defragged my hard drive, memory, shut down all unnecessary services and done a fresh restall of the game.
 
Enigma said:
Darn straight there's a memory leak, unless Civ 4 is supposed to use 400+ Megs of memory...

Actually, it is. Some of the scenarios take a gig or more to load.
 
Back
Top Bottom