project reality header
Go Back   Project Reality Forums > Project Reality Support > PR:BF2 Support
08 Sep 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
PR:BF2 Support Help and support regarding PR:BF2 installation and in-game issues

Reply
 
Thread Tools Display Modes
Old 2012-01-18, 06:54   #1
BloodyDeed
Retired PR Developer
Supporting Member

BloodyDeed's Avatar
Exclamation [32Bit XP/Vista/7] Fix memory errors / Allow applications to use > 2GB RAM

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
  1. Select "My Computer" with a right-click and choose "Properties"
  2. Click the Advanced tab.
  3. Switch to the "Startup and Recovery" area and press "Settings"
  4. In the System startup section, click Edit.
  5. It should automatically start Notepad displaying the Windows boot.ini
  6. In the "Operating Systems" section, add /3GB to the end of the line that includes /fastdetect
  7. Don't forget to save the changes and close Notepad and all open dialog boxes.
  8. To let the changes take effect restart your computer


b) Windows Vista/7: How to setup increaseuserva Bootparameter
  1. Navigate to Start>All Programs>Accessories>
  2. Right-click "Command prompt" and choose "Run as administrator"
  3. A command line window should open
  4. Type in "BCDEdit /set increaseuserva 3072" (without quotation marks) (Screenshot)
  5. 3072 is the maximum, "2560" or "2816" is in most cases sufficent.
  6. 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 :P
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]

BloodyDeed is offline
Last edited by [R-DEV]BloodyDeed; 2012-01-19 at 06:52..
Reply With Quote
Old 2012-01-18, 19:13   #2
karambaitos
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

erm https://www.realitymod.com/forum/f27...ame-crash.html
already been posted?
karambaitos is offline Reply With Quote
Old 2012-01-18, 19:19   #3
BloodyDeed
Retired PR Developer
Supporting Member

BloodyDeed's Avatar
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

This thread is there to solve ANY misunderstandings regarding the largeadress aware functionality.
We got a lot of questions regarding this lately and people actually didnt know the difference between the bootoption and the flag.

Also this thread is the beginning of some greater restructure and cleanup of the support forum area.

I hope you dont mind if it some sort of replaced your thread, but this one got created by ourselves, so we are always free to edit and modify it related to PR/BF2.
I'm not sure if youre the real author or just quoting but this thread has also been created based on official support documents by Microsoft to ensure the things are true/correct and working.

BloodyDeed is offline Reply With Quote
Old 2012-01-18, 19:23   #4
karambaitos
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

nah, i dont mind, but if you are going to remove mine, add in screenshots on how to do it, since they help more than text, and what CMD is suppose to return once you press enter.
im actually glad that this is going to be stickied, it took me a year, before i finally found out how to stop 32bit crashes in PR, no one on the PR forums knew -_-


EDIT: with the boot.ini for xp its smart to make a back up, in case you screw up, so you can still start your windows up
karambaitos is offline
Last edited by karambaitos; 2012-01-19 at 02:33..
Reply With Quote
Old 2012-01-19, 00:35   #5
MaSSive
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

If you get 64bit system you would never need it in first place

We will add screenshots, as soon as we get time. As BD said we are working on complete cleanup of support section, and if you want to contribute with something, write a suggestion and we will revise it, and implement it. Sure we will credit you for it.

Cheers
MaSSive is offline Reply With Quote
Old 2012-01-19, 01:31   #6
LITOralis.nMd
Retired PR Developer
Supporting Member
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

XP screencaps:







LITOralis.nMd is offline Reply With Quote
Old 2012-01-22, 11:38   #7
fredo456

fredo456's Avatar
Default Re: [32Bit XP/Vista/7] Allow applications to use > 2GB RAM

I tried to set 3GB's on 32bits XP (I have 4 installed) but at the restart of the computer, the screen resolution went back to 1280*700 instead of 1280*1024 and I felt that the graphic card (GT-240) was de-activated somehow, the windows were draging VERY slowly and the internet pages were lagging when I was scrolling to the end of it. I don't have an integrated graphic unit so I don't understand why I have so much trouble after the manipulation. Someone can help?
fredo456 is offline Reply With Quote
Old 2012-01-22, 12:39   #8
BloodyDeed
Retired PR Developer
Supporting Member

BloodyDeed's Avatar
Default

Afaik your graphiccard uses shared memory.
That means it uses part of your RAM and the left over 1GB for the kernel arent enough.

BloodyDeed is offline Reply With Quote
Old 2012-02-21, 17:46   #9
fredo456

fredo456's Avatar
Default Re: [32Bit XP/Vista/7] Fix memory errors / Allow applications to use > 2GB RAM

I changed my GT-240 for a Radeon HD 6850, but the strange effects after allocating 3GB's of RAM are still there. Can we allocate a value like 2.5 GB for instance?
fredo456 is offline Reply With Quote
Old 2012-02-21, 18:13   #10
LITOralis.nMd
Retired PR Developer
Supporting Member
Default Re: [32Bit XP/Vista/7] Fix memory errors / Allow applications to use > 2GB RAM

Yes you can Fredo.
Weird things can happen,

Here is a general article on how to change boot.ini , MAKE SURE YOU BACK UP YOUR BOOT.ini BEFORE YOU START EXPERIMENTING ON IT.
How to edit the Boot.ini file in Windows XP

But you have to read this article for info on how this affects XP,
You have to fine tune the use of /3gb or /2.5g and the uses of userva, ...
Available switch options for the Windows XP and the Windows Server 2003 Boot.ini files
scroll down to the /userva section and read those articles..
How to use the /userva switch with the /3GB switch to tune the User-mode space to a value between 2 GB and 3 GB is important.

Basically, if you drop to 2.5gb using the /2.5GB switch, you might have to manually change the /userva switch to work with PR and any other big games/programs you use.

LITOralis.nMd is offline Reply With Quote
Reply


Tags
&gt, >, 2gb, 32bit, applications, draft, errors, fix, memory, ram, xp or vista or 7

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 02:46.