"bad memory allocation" when saving

snoochems

Prince
Joined
May 25, 2004
Messages
434
Hi all.

I'm playing an 18 player, 'HUGE' map, single player game.

My machine is probably a little better than most:
2.4GHz AMD64
1.5GB RAM
256MB X800XTPE

Anyways, in this game, i'm using 1.65GB of memory, so it's obviously using the swap file. I don't mind, as the slow down is something I can live with.

WHat I can't live with though, is that every now and then, when saving, the game crashes, and gives me a "bad memory allocation" error, and CTD.

THe save game is useless too. So, unfortunately, saving happens automatically every turn. So... it sucks.

On top of this, the game takes AGES TO LOAD my current game. I thought they made the game better in terms of memory usage. I would expect a game like this use so much RAM. What's the deal? 64 player Battlefield 2 doesn't use nearly this much RAM!

ANyways, is there a fix besides not playing such big games? Or buying more RAM?
 
Are you playing with superhuge maps? With "standard" huge maps you games shouldn't be using 1.65GB. On my pc it barely get over 1 Gb (civ4 using 600-700mb itself)with 1.52 patch. If you are playing on maps bigger than huge then you have to have everything running with ram without file swapping or you will get this problem. It seems memory gets misplaced when civ4 uses huge amounts of memory and start relying on the hard drive. Also Try to reduce the programs running in the background.
 
something must be wrong with Your OS settings of utility software running in background - 70% probability. RAM or HDD has hardware problms - 25% probability. Civ4 has some memory leak - small probabilty, I dont notice anything like that.

You say that when windows uses swap, there is noticable slowdown? with 1.5 gigs of RAM and Your nice CPU? not knowing anything about You and PC I would do HDD defrag at first. then run windows update and shut off all utilitys. if still no good - format and reinstall Windows. on the other hand - You have 1.5 Gigs RAM. such an amount means different RAM modules, probably try taking out ones that are most suspicious (like older 2x256 from previous PC). just what seems easier to do, HDD replace stays the last to do I quess. somewhere inbetween there also BIOS, driver and chipset upgardes to do. those are nice to do anyway, will not be useles even if the problem is elsewhere.
 
I have exactly the same problems as snoochems.

Playing on modded "gigantic" maps, my system fails to successfully save at a certain point of time. Overall usage of the swap file is around 1.7 GB at those moments. The error message is "bad memory allocation".
Nevertheless, if I ALT-TAB to other programs, the system still works fine. It does so in-game as well. Only the saving is concerned.

This leads to the fact that I cannot finish games on those "gigantic maps" or I do have to let the computer run all day and night and have to hope for the best.

At Kurbads: I appreciate your input, yet my system has been set up quite properly. The swap file resides on a second HD in its own partition. Windows got a clean install and all drivers are updated.
I am pretty sure the problem originates from a routine of the game, as I can run the whole set of office programs and whatever I like , squeezing the system to the very last drop of memory without any similar problems.
 
Kurbads said:
something must be wrong with Your OS settings of utility software running in background - 70% probability. RAM or HDD has hardware problms - 25% probability. Civ4 has some memory leak - small probabilty, I dont notice anything like that.

You say that when windows uses swap, there is noticable slowdown? with 1.5 gigs of RAM and Your nice CPU? [...]
To go into more details:

Civ4 has clearly been optimized for small maps with lower settings. Therefore, it might very well be that you never made similar experiences if you do not use max settings.
There definetely IS a threshold somewhere - if you cross it, you may run into problems.
Don't get me wrong: I don't blame the game for becoming slow when in inter-turn. This is quite understandable, as there are many many algorithms to be run.
To be honest, the system performs very well in inter-turn. Here they have put in massive improvements.

Nevertheless, some part of the engine faces severe problems with big memory loads, even after patch 1.52. I don't say, it has a memory leak - yet at a certain point of system load it starts getting problems with internally organizing memory.
 
Txanx for nice discusion! so I didnt know that subject is about modded ultra big maps - modded stuff sure can make problems. I was speaking of my own experiance I had so far with Huge - what I can find in default install. I had nothing like memory problem there, I looked on performace analysys tool and figured I need better CPU, but it seemed that my small 1GB ram is enaugh.

where are those maps found? would be tempting to get one and try, this default Huge dint seem huge at all, assuming I love playing Earth again and again, having single Rome per whole Italy dont seem much fun, no chance to fool around and try placing citys in original locatiosn and so on. can You give link? I would comment on saving problem then.
 
Hi Kurbads,

please see this link:
http://www.civforum.de/showpost.php?p=810833&postcount=36
(sorry, my Firefox currently has problems with the bbp- and whatever codes used here.)
The link refers to a site in Germany, but I hope the vital information is understandable.
Changes are to be made in file "CIV4WorldInfo.xml" ( to be found in Assets-XML-GameInfo ).
The lines to be changed are:
< iGridWidth >40< /iGridWidth >
< iGridHeight >25< /iGridHeight >

I've learned that a height/width ratio of 1.6:1 should be obtained.
 
ok, I ll try, however hate to do modifications, it usually gives more problems then advantages. but I am curious to see how that works on my system.
 
i too have this problem and get around it by turning oof all unit graphics when ending goes (its one of the icons above the map menu) however, it does take ages to load up still.
 
tried super maps yesterday. seems to me that really the problem is that those are not planned to be working - everything gets slower on my PC so much, that I even didnt get to save - stuck and got pxxxxd off after some number of turns on everything on autobuild and autoexplore. I need serius PC upgrade prior to experimenting :)
 
have a look at my specs and decide, if your system is comparable. Granted, at the later centuries the game WILL slow done, and inter-turn may take 2 minutes.
Granted as well, the system will be slower responding to your input in those later stages. Yet, it is definetely more fun.
 
Back
Top Bottom