[32Bit XP/Vista/7] Fix memory errors / Allow applications to use > 2GB RAM
Posted: 2012-01-18 06:54
TL;DR: This will fix many memory related CTD errors on 32Bit operating systems.
1. Introduction
There has been a lot of confusing on this matter lately so I will try to clear things up.
We have to make a difference between the Large-Address-Aware-Flag and the /3GB Bootparameter (WinXP) or increaseuserva (WinVista/7). While there are often understood as the same they are not and its important to know the differences.
Additionally keep in mind that the bootparameter only affects you if you are using Windows 32Bit whilst the LAA-Flag can also be used on 64Bit operating systems.
It can solve many CTD issues to set the bootparameter but keep in mind: NEVER apply /largeaddressaware to the BF2.exe, more to that later.
2. /3GB Bootparameter / increaseuserva
Note: Both names describe the same functionality, /3GB on Windows XP, increaseuserva on Windows Vista/7.
Windows divides all your memory (RAM) in Userspace and Kernelspace.
On Windows 32Bit 2 GB are used as Userspace and the remaining 4 GB minus Userspace as Kernelspace.
This means EVERY program can use a maximum of 2 GB RAM.
However, Windows provides a method to increase the Userspace to any value between 2048 (2 GB) and 3072 (3 GB) megabytes in decimal notation.
In comparison a 64Bit operating system usually allows any program to use the full 4 GB, so the following steps are NOT needed if you use Windows 64Bit.
Note: both parameters can cause trouble in case 1 GB kernelspace is not enough. This problem occurs in particular when using an integrated graphic unit (common used in notebooks).
a) Windows XP: How to setup the /3GB Bootparameter
b) Windows Vista/7: How to setup increaseuserva Bootparameter
3. Large-Adress-Aware-Flag
Giving programs the opportunity to use it doesnt automatically make them use it
32 Bit Applications (which are most of you are using, so is BF2/PR) need a special flag to be set, so they know they can allocate more than 2 GB.
Fortunately most of the modern game developers know this tweak and implemented this flag by default.
So does Battlefield 2 with the latest 1.5 patch.
Keeping that in mind there is no need to modify the BF2.exe and for this reason it won't get explained in this tutorial.
Fiddling with your game's .exe is not recommended for online games anyway as some Anti-Cheat Tools might kick you for manipulating it.
Thats it. I hope this clears things up a bit and might be a help to some of you.
Thanks to karambaitos, for his thread about this and the screenshot.
Cheers
BloodyDeed, PR Support Team
Disclaimer: Use the steps above at your own risc, the PR Support Team won't be responsible for any damaged caused.
Sources: [1], [2], [3]
1. Introduction
There has been a lot of confusing on this matter lately so I will try to clear things up.
We have to make a difference between the Large-Address-Aware-Flag and the /3GB Bootparameter (WinXP) or increaseuserva (WinVista/7). While there are often understood as the same they are not and its important to know the differences.
Additionally keep in mind that the bootparameter only affects you if you are using Windows 32Bit whilst the LAA-Flag can also be used on 64Bit operating systems.
It can solve many CTD issues to set the bootparameter but keep in mind: NEVER apply /largeaddressaware to the BF2.exe, more to that later.
2. /3GB Bootparameter / increaseuserva
Note: Both names describe the same functionality, /3GB on Windows XP, increaseuserva on Windows Vista/7.
Windows divides all your memory (RAM) in Userspace and Kernelspace.
On Windows 32Bit 2 GB are used as Userspace and the remaining 4 GB minus Userspace as Kernelspace.
This means EVERY program can use a maximum of 2 GB RAM.
However, Windows provides a method to increase the Userspace to any value between 2048 (2 GB) and 3072 (3 GB) megabytes in decimal notation.
In comparison a 64Bit operating system usually allows any program to use the full 4 GB, so the following steps are NOT needed if you use Windows 64Bit.
Note: both parameters can cause trouble in case 1 GB kernelspace is not enough. This problem occurs in particular when using an integrated graphic unit (common used in notebooks).
a) Windows XP: How to setup the /3GB Bootparameter
- Select "My Computer" with a right-click and choose "Properties"
- Click the Advanced tab.
- Switch to the "Startup and Recovery" area and press "Settings"
- In the System startup section, click Edit.
- It should automatically start Notepad displaying the Windows boot.ini
- In the "Operating Systems" section, add /3GB to the end of the line that includes /fastdetect
- Don't forget to save the changes and close Notepad and all open dialog boxes.
- To let the changes take effect restart your computer
b) Windows Vista/7: How to setup increaseuserva Bootparameter
- Navigate to Start>All Programs>Accessories>
- Right-click "Command prompt" and choose "Run as administrator"
- A command line window should open
- Type in "BCDEdit /set increaseuserva 3072" (without quotation marks) (Screenshot)
- 3072 is the maximum, "2560" or "2816" is in most cases sufficent.
- To let the changes take effect restart your computer
3. Large-Adress-Aware-Flag
Giving programs the opportunity to use it doesnt automatically make them use it

32 Bit Applications (which are most of you are using, so is BF2/PR) need a special flag to be set, so they know they can allocate more than 2 GB.
Fortunately most of the modern game developers know this tweak and implemented this flag by default.
So does Battlefield 2 with the latest 1.5 patch.
Keeping that in mind there is no need to modify the BF2.exe and for this reason it won't get explained in this tutorial.
Fiddling with your game's .exe is not recommended for online games anyway as some Anti-Cheat Tools might kick you for manipulating it.
Thats it. I hope this clears things up a bit and might be a help to some of you.
Thanks to karambaitos, for his thread about this and the screenshot.
Cheers
BloodyDeed, PR Support Team
Disclaimer: Use the steps above at your own risc, the PR Support Team won't be responsible for any damaged caused.
Sources: [1], [2], [3]