Memory Allocation Failure and stuff

Cyrusfan

King
Joined
Jul 18, 2009
Messages
667
Well I finally got brave and took another look in the technical forum about those MAFs. The previous thread I read had quite an argument over whether or not the proposed solution actualy worked or was already outdated. There is already something in BTS 3.19 that tells Windows to allow Civ to use 3gb of RAM, but if I understand this right, you apparently need to tell Windows (in my case Vista Business edition) to allow programs to use 5gb of RAM as well. It wasn't all that hard.
http://dwf.blogs.com/beyond_the_paper/2009/04/enabling-3gb-switch-on-windows-vista.html

In a marathon game on a Huge map at save size just over 1mb, I was getting MAFs every 4 or 5 turns this afternoon. After trying this adjustment, I went 20+ turns without problem (and built the tower of mastery, so I have no reason to expect that was the limit of my luck. This isn't actually a fix in that Civ still eats up more memory, it just provides a bigger bowl so it takes longer to overflow.

On the other stuff, the only big problem I had in that game was barbarian animals getting stuck inside borders leading to crashes. So, I'll try to be braver and go with Animal Invasion on next time.
 
That's interesting and I really would like to go back to Large and Huge maps with more civs in the game.

However, my question is the same one as the last one in that forum:

"What about with Windows 7?"

Now, I can clearly not get bigger than a standard-sized map with 6 civs total. If the Frozen, Basium or Infernals (or even Koun, I guess) enter the game things start bogging down. Also, .5mb for my save file seems to be the point where the CTDs come for me.
 
For Windows 7, the command is:

"BCDEDIT.EXE /Set IncreaseUserVa <value>"

so

"BCDEDIT.EXE /Set IncreaseUserVa 3072"

I've been playing "Histoy in the Making 4.0" in the Earth18 map for 4 hours without any MAF. Previously I've been playing "Total War 1.0" in a huge continents random map and no MAFS.

This command is wonderful :)
 
That's interesting and I really would like to go back to Large and Huge maps with more civs in the game.

However, my question is the same one as the last one in that forum:

"What about with Windows 7?"

Now, I can clearly not get bigger than a standard-sized map with 6 civs total. If the Frozen, Basium or Infernals (or even Koun, I guess) enter the game things start bogging down. Also, .5mb for my save file seems to be the point where the CTDs come for me.

What is the syntax you use in your boot.ini file?

I first tried the one with the /3072 switch, and I had no improvement...

Then, without believing in it I went with an alternate syntax... I edited the boot.ini directly and appended /3GB to my boot line, this gave me that:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Pro 3GB" /noexecute=optin /fastdetect /3GB

and ... MIRACLE... MAF are much much rarer now. I can play bigger maps, longuer...
 
I first tried the one with the /3072 switch, and I had no improvement...

Did you run the command prompt as administrator?

I'll put the full proccedure for Windows 7:

1.-Right-click Command Prompt in the Accessories program group of the Start menu. Click Run as Administrator.

2.-At the command prompt, enter "BCDEDIT.EXE /Set IncreaseUserVa 3072" without the "". You MUST write BCDEDIT.EXE; you NEED the .EXE, that's the key.

3.-Restart the computer.
 
Uhhh

Unless I'm very much mistaken there's no 32-bit Windows 7, thus no real reason to fiddle around with the /3GB stuff. The /3GB is a "bigger cup that might still overflow", but 64-bit OSes "cup" is so ridiculously huge that you could probably rig it up to play 4 simultaneous games at once (if your CPU didn't melt) and it'd still not give you a MAF.
 
Uhhh

Unless I'm very much mistaken there's no 32-bit Windows 7, thus no real reason to fiddle around with the /3GB stuff. The /3GB is a "bigger cup that might still overflow", but 64-bit OSes "cup" is so ridiculously huge that you could probably rig it up to play 4 simultaneous games at once (if your CPU didn't melt) and it'd still not give you a MAF.

There most certainly are 32 bit versions of Windows 7
 
Did you run the command prompt as administrator?

I'll put the full proccedure for Windows 7:

1.-Right-click Command Prompt in the Accessories program group of the Start menu. Click Run as Administrator.

2.-At the command prompt, enter "BCDEDIT.EXE /Set IncreaseUserVa 3072" without the "". You MUST write BCDEDIT.EXE; you NEED the .EXE, that's the key.

3.-Restart the computer.

I can't assure you about that, but what I know is that I looked into my boot.ini file and it had the 3072 switch... and that did nothing.

So I edited boot.ini by replacing the statement to /3GB, and I got a significant improvement.
 
Uhhh

Unless I'm very much mistaken there's no 32-bit Windows 7, thus no real reason to fiddle around with the /3GB stuff. The /3GB is a "bigger cup that might still overflow", but 64-bit OSes "cup" is so ridiculously huge that you could probably rig it up to play 4 simultaneous games at once (if your CPU didn't melt) and it'd still not give you a MAF.

I run 64-bit Windows 7 with 8GB of RAM and I still get MAF errors
 
I used to have random crashes and maf. Then I tried these steps and it stopped. Thanks gang. Runs like a dream. Before 'tweaking' was just a default install of win 7 on my machine.
 
question: is there a solution like this for windows XP? i get lots of MAFs and CTDs.

specs are intel core2 duo 2.66ghz, 3.25gb RAM listed (4gb installed), nvidia 9800 gt. and of course, the now out-dated Windows XP.
 
Guess the problem is in some memory issues and other bugs in the mod itself(so you cant really fix it by modifying your system), because i never had even single crash due to any reason while playing original ffh on huge map with 12+ teams and thats all with only 2 gb RAM. Also its 10x(AT LEAST) faster when you wait for the next turn.
 
The issue with MAF is a) design of Civ4 and b) amount of Memory needed by Rife. So basically you got two options: a) get Valkrionn to remove some features from Rife that use memory (doubt you have much success with this) b) use settings that need less memory (aka smaller maps). You could also try to increase all unit costs as that would result in less units in the game.
 
How hard would it be to have an option that could limit the number of units each civ produces, similar to what you see in many RTS games.

I think it would help reduce the MAFs, CTDs, and time between turns if you took some of the units off the map. I think it would especially help the time between turns. If you turn on the see enemy/friendly moves, you will see that just about EVERY units moves - even if it means moving the max movement pts and ending up in the same tile as before. Some units just seem to spin in place. When you multiply this times the number of units in your game, you get the 5-10 minutes between turns and MAFs, I think.

It would also give you a different kind of challenge of selecting your troops as you have a limit.

I guess the problem would be with the AI which seems to be programmed to spam out many low-level units.

Personally, I'd like to go back to bigger maps, slower game speeds and more civs in the game, but it's just not possible now. I'm even getting quite a few CTDs with Normal Speed, Standard sized map (default no. of civs) after I am half way through the game.

It's like watching paint dry waiting for the next version. ;) I realize the developers and testers are putting in the time to give us a very good game, but damn it seems like forever. Anyway, here's hoping the new version is more stable and more extreme game variable can be played.

I just finished Defense Grid: The Awakening, Borderlands, and Dragon Age and I'm ready to be RiFE'ed again. :)
 
If I only have 2Gb of physical RAM, what'd be the safe map size for me?
 
If I only have 2Gb of physical RAM, what'd be the safe map size for me?

It's really hard to answer that as there are many other variables involved. For example, your various game settings such as game speed, number of AI civs, screen resolution, etc.

As well, your video card might have something to do with how big a map you can use. Maybe your processor too.

Then, again, honestly, it may be something else altogether. For example, I have 4gb of RAM and a video card with 1 gb of memory. I wouldn't dare try anything larger than a standard sized map with the default number of civs. Even so, I seldom make it past Turn 400-500 in a normal speed game unless I have a quick victory of some sorts.

The grand poobah is telling us things look better in the next update and we are all holding our breath and crossing our fingers.

For now, I'd suggest you try a Standard sized map with the default number of civs and see how that goes.
 
This has been asked before by someone else but not answered.
Is there something I can do for it on Windows XP?
 
Top Bottom