Thursday, May 1, 2008

2GB memory limit crash when more RAM is available

This fix is for those of you that have applications that crash under Vista 32 or 64 a lot. The crashes are apparently due to a 32-bit application without LARGEADDRESSAWARE being able to see and use more then 2 GB on any Microsoft OS (32 or 64 bit). This doesn't mean the OS can't see more memory. The operating system sees it fine, the application runs into trouble when it sees it and freaks out. The program was designed to only see 2gb total, so it doesn't matter if it is in x32 or x64, the program is restricted. Since the OS and other resources eat up that same memory, it will crash. Why doesn't it happen under XP?It does, just not as often because XP uses less ram as a whole. Vista eats up more resources and exploits the problem better.Here is the fix. Hours of web trolling helped mad_boris find this. You actually have to manually patch your own software. Whichever primary executable you are using is the one to fix. Crashes are now very very rare after applying this fix. This method actually patches your main executable with the LARGEADDRESSAWARE flag so it will address more memory. Why application developers have not see this as a problem, I don't know.
Mad_Boris uploaded this:
http://files.filefront.com/3GB_enabler2zip/;6791818;/fileinfo.html
In this zip file, you should find editbin.exe
Don't forget to backup your original applicationName.exe file (for future patch compatibility)FOR VISTA 32 and 64 "Vista 32 users may have to apply second step as well."
1. Copy your applicationName.exe from your application folder to your editbin "3gb_enabler2 unzipped" folder.
2. Open an Elevated Command Prompt with Administrator Privileges.
3. Change to the folder where you unzipped editbin.exe.
4a. type "editbin.exe /LARGEADDRESSAWARE applicationName.exe" without the quotes and rename it to applicationName_copy.exe
EXTRA STEP VISTA 32: x64 users do not have to do this at all as x64 has no problems giving 4gb+ ram to 32 bit apps.. however.. Vista 32 users may.
4b. type "BCDEDIT /set increaseuserva 2900" without the quotes. NOTE: System boards vary. if 2900 does not work try 3072 bcdedit.exe is in thewindows\system32 folder.
5. Copy the patched applicationName_copy.exe back to your /bin directory.
6. You can either change existing shortcuts, or create a shortcut to point to the patched executable applicationName_copy.exe, or rename the original toapplicationName_orginal.exe and the copy to back to applicationName.exe Whichever method is better for you.
The clue is '32-bit applications' without LARGEADDRESSAWARE in their file header can't see and use more then 2 GB on any Microsoft OS (32 or 64 bit). Does not depend on how many GB you have installed. Some applications and games on max settings use more then 1.5 GB memory. Vista after starting up uses about 500 MB. 1.5 GB + 500 MB = 2 GB - max memory limit has been reached and will cause crash when your application tries to use more memory. With LARGEADDRESSAWARE flag your '32-bit application, can now use 3 GB on 32 bit Windows and 4 GB on 64 bit Windows. It is more then enough for most application max settings to handle in 2008.

No comments: