making Galciv2 access more than 2GB of memory with 32bit (no 64bit compiling and recoding necessary)

Large_Address_Aware bit info in galciv2 executables

By on October 25, 2008 11:07:01 PM from Stardock Forums Stardock Forums

whismerhill

Join Date 03/2006
+19

I just had a few days ago, an out of memory error from galciv2 while quicksaving the game (4GB of ram + XP64) (sidenote: launching process explorer AFTER the crash showed me a peak memory usage of about 3GB with 1GB currently used by windows and other programs, so I think galciv2 just crossed the 2GB treshold)

while searching for other things for other games I stumbled on this information :

http://www.amd.com/us-en/assets/content_type/DownloadableAssets/Expand_Memory_of_32-bit_App_-_Microsoft_4GT-_6204.pdf

 

Apparently all you need to do is to set a simple "flag" or bit on the executable to allow it to access higher than 2GB addresses. And I of course already checked galciv2 executables and it is NOT set.

Q: Are there any other changes necessary to take advantage of 4GB virtual memory ?

A: No, only the LAA bit needs to be set with either a linker or binary change. no other source code or binary changes are required.

 

Of course I have the knowledge required to do this myself from my poor chair, but this is against the laws as far as I know. So just suggesting stardock devs to look into this, if they ever want so as this is ... like a 10 seconds modification, ok 5 minutes if you take the time to carefully read the document I linked to.

29 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
February 4, 2009 5:04:35 PM from GalCiv II Forums GalCiv II Forums

Thanks for the reply, whismerhill. I suppose that I'll just have to wait for Win7.

Reason for Karma (Optional)
Successfully updated karma reason!
February 4, 2009 5:06:41 PM from GalCiv II Forums GalCiv II Forums

double post

Reason for Karma (Optional)
Successfully updated karma reason!
April 14, 2009 2:07:45 PM from Stardock Forums Stardock Forums

Quoting whismerhill,
unfortunately XP home is a rather limited edition of XP 32 bits

and as such (AFAIK) it doesn't support the /3GB switch necessary for the OS to handle memory amounts up to 3GB for a single process

(in other words, if you modify galciv2 to access more than 2GB, XP home will ignore the setting and allow only up to 2GB

the documentation on this subject is rather sparse (and most people don't realize that the switch itself is not enough and so say proudly "it works" while it does nothing at all) though :

http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx (as one can see XP home is not written here.Media center edition too but XP media center is just an XP Pro with media center software)

ho and lastly putting it in your "boot.ini" file won't do any harm, it's just ignored..

 

 

for more general information there is interesting reads here : http://blogs.msdn.com/oldnewthing/archive/2005/06/01/423817.aspx

http://blogs.msdn.com/oldnewthing/archive/2004/08/05/208908.aspx

http://blogs.msdn.com/oldnewthing/archive/2006/08/14/699521.aspx

Wow, and I get called a nerd...

Seriously, though; I bow before your prowess.

I tripped over this thread lookin for something completely different, but I had to ask:

I'm running XP x64 with 8GB RAM.  Would using this 3GB switch give any improvements in game performance across the board (assuming that it's possible with this OS).  (And also realizing that most games are coded for </= 2GB RAM).

Just curious.

Reason for Karma (Optional)
Successfully updated karma reason!
April 14, 2009 4:54:36 PM from GalCiv II Forums GalCiv II Forums

Afaik XP 64 is capable of a 3GB user space, so, if you do the modification, GC2 should be able to use more memory. I would not expect performance increases, it'll be mainly of use to prevent the game running out of memory when using the largest maps.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000188   Page Render Time: