Saturday February 11, 2012 5:43 AM AEST

Memory usage myths

By Ashton Mills
15:08 Aug 14, 2009 | 9 Comments
Tags: expanding | addressable | memory | space | RAM | gaming | 64-bit | computing
« 
Memory usage myths

Large Address Awareness
Remember that the 2GB limit on 32-bit applications is a limitation imposed by the operating system. This wasn't arbitrarily chosen, it's a restriction that ensures no matter how much memory an application needs, there will still be memory for the operating system itself. On 32-bit Windows 4GB is the entire addressable space, and the operating system needs to fit within this as well as address hardware and provide for applications.

But on 64-bit Windows the operating system doesn't need to squeeze into the lower 4GB, meaning more addressable space can be freed up for programs. And, although it may have a negative impact on the operating system, you can even tell 32-bit Windows to give a little more back to the programs and divide memory into a 3/1 split, giving 1GB to the operating system and 3GB to programs.

The only requirement is that these programs are linked at compilation time to be large address aware. Since you or I don't have access to the source code, we can't re-link programs to use a larger address space. Fortunately, you don't have to, as some basic tools will alter the headers on them for you.

Using large address awareness, the breakdown looks like this for addressable space per program:

32-bit application on 32-bit Windows: 3GB

32-bit application on 64-bit Windows: 4GB

64-bit application on 64-bit Windows: 8TB

As you can see there's a doubling of the range even for 32-bit applications on a 64-bit system, but if it's not already clear the best scenario is to run 64-bit applications on a 64-bit operating system. You don't have to tweak anything here, as the 8TB limit for 64-bit applications is quite spacious, at least for now.

Expanding the addressable space
The procedure for altering the headers of a program is pretty simple, but note one big caveat: not all programs will be happy with this, because they simply weren't designed for it, and may crash and burn horribly.

First grab one of the many tailored scripts (search on 'large address aware' and game title) for Flight Simulator, STALKER, Supreme Commander or Fallout 3. You can get the Fallout 3 one for example from here.

If you're applying this to Fallout 3, following the instructions and running the batch file is all you need to do. But the batch file only scripts the utilities bundled in the archive - you can use them for any program, game, productivity application or otherwise. There's actually only two you need to use, dumpbin.exe and editbin.exe. To add the large address aware header to a program open up a command prompt and run:

editbin /LARGEADDRESSAWARE [application]

To remove it:

editbin /LARGEADDRESSAWARE:no [application]

To see if if a program is enabled run:

dumpbin /headers [application]

and look for 'Application can handle large (>2GB) addresses' at the top of the output.

Why would you want to remove it? For one if it doesn't work well, and secondly to restore an EXE back to its original state, which game patches may require before they'll update it. In fact, note that some games may not let you do this at all, thanks to DRM (Digital Restrictions Management) schemes, especially Starforce, as these detect if an executable is modified.

If you're running 64-bit Windows, you don't need to do anything else. If you're running 32-bit Windows XP or Vista, there's one more step you need to do. For Windows XP: click My Computer > Properties > Advanced > Startup and Recovery, then click on Settings. Next click Edit to edit the BOOT.INI, and append:

/3GB /userva=2900

This enables what Microsoft calls [i]4GT RAM Tuning[/i]. The 'userva' option allows you to tailor how much extra addressable space is used instead of the default 3072 (3GB). You can try without it, but some reports suggest Windows XP and its drivers (presumably, and especially with large-VRAM graphics cards using up addressable space) giving XP more than 1GB. Certainly this will be the case if you're packing SLIed 512M or more cards.

For Vista simply open a command prompt and run: bcdedit /set IncreaseUserVa 3072

Using large address awareness will allow you to use more of your memory for those programs that could make use of it, but on the whole even including such demanding programs you would need to be using content creation programs editing very large files to make use of any more than a few gigs of memory on a home machine. For most users, including gamers, money spent on extra memory could probably be better spent elsewhere.

 
« 
 
This article appeared in the September, 2009 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
9 Comments
bu14-1
Aug 14, 2009 5:04 PM
"32-bit application on 32-bit Windows: 3GB"

2GB?
SlickGrunt
Aug 14, 2009 5:08 PM
very well put. just like the article on power supplies. too much being a waste in summary. but hey let people flash their wallets with their assets :P more money for the industry... and humour from my end.
SlickGrunt
Aug 14, 2009 5:11 PM
btw thx for recommending that program; process explorer - extremely helpful for me! (was unknown to me until now)
Michel Merlin
Aug 16, 2009 11:38 PM
More RAM is ALWAYS better
~-~-~-~-~-~-~-~-~-~-~-~-~
The only exception I knew of was
http://groups.google.com/group/microsoft.public.windowsxp.general/msg/381f4171c51ac103
« SOLVED by hotfix KB909095 (Hibernation disappears in XP if 1GB or more) »

Currently the max RAM really available and usable in the real world has stalled at 2GB for a while. With prices down and OSes up, it is 3GB under 32bit Windows, 6GB (apparent standard) for 64bit editions of XP or Vista, and given the progress and the manageability of RAM, it will soon grow much higher.

Now don't be too hurried: the memory that costs a car now will cost a hamburger in little time (hence e.g. my buying of 32MB extensible to 256MB in 1999). So, don't worry buying all you need and a little more, but don't build too much stock.

Versailles, Sun 16 Aug 2009 15:38:50 +0200
Michel Merlin
Aug 17, 2009 12:22 AM
Buy moderate RAM, but HIGHLY EXTENSIBLE
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
I forgot the main point: while being moderate in the quantity you ACTUALLY buy NOW, do choose much bigger extensibility, whatever gurus may be saying.

- In 1981, I bought the Sinclair ZX81 with its "whoppy" 1KB, that most people found unreasonably big.
- In 1999, std was 16MB (for a laptop), I bought not too much (32MB) but highly extensible (256MB), which later appeared a very good choice
- In 2006 std was 512MB (for a laptop), I bought 2GB (was cheap, currently busy nearly 100%
- In 2009 I am shopping for a new laptop, the ONLY reason being AGAIN the RAM capability (will prolly wait for an i720 laptop with Windows 7 64bits).

Remember that any single tiny bit swapped to the HD, takes as much time as ONE MILLION more info in RAM (access time 1E-8 sec in an 1GHz RAM, 10ms on a HD), so *the RAM size will remain paramount* until RAM is as big as the *used volume on system partition* (currently often 40GB, growing fast).

Versailles, Sun 16 Aug 2009 16:22:10 +0200
Nicolaos
Aug 22, 2009 1:32 AM
Well yeah, but some people want that number (Virtual Lenth ;) ).. even if they dont relise that most of the time having 2x6gig sets whilst trying to overclock will more then likely give you less performance then with a single 6.. as you will have to raise your V's... me i have to have 12 gig of ram, no for measurement, but to run 6 - 10 VM's on my machine at anytime...

but hey all that said, let stupid people by more ram cause that will hopefully bring down the prices.. :P
strifus
Aug 22, 2009 7:47 AM
I beg to differ Merlin. If you read the article again, and I tend to agree with it in the first place, it is the OS which decides whether or not to swap out to HDD under any circumstances. So, giving it as much RAM as you can get shoved down the slots doesnt necesarrily mean it will get used for that instance if Windows gets its way.
Michel Merlin
Aug 25, 2009 10:01 PM
Misc replies
~-~-~-~-~-~-
"Nicolaos", MOST people have to do something else than seeking "performance" on their PC, thus "have to have" enough memory that it's not the bottleneck; VMs, 1st are more frequent that you seem to think, 2nd are far from the only or main reason to need RAM; just surfing EFFICIENTLY (hence smoothly and swiftly) needs a lot, at least for the ones (still existing, albeit now a minority) who think and check before posting, which with the current sticky web requires 50-100 buttons on Taskbar, or at least 2GB RAM. And I recall, 4GB RAM in great brand and high quality is 40 EUR now in France (surely cheaper elsewhere). BTW calling "stupid" the ones you seem unable to understand lessens YOUR image more than theirs.

"strifus", I don't see anything in your post that would differ with mine - excepted that YOU appear to NOT have read me before "answering".

Versailles, Tue 25 Aug 2009 14:01:25 +0200
elmo198
Aug 26, 2009 7:54 PM
well here is a question I have been meaning to ask for sometime.

I have vista x64, running when possible 64bit apps. but I also have a vid card that has 2gb of ram ati 4870x2 and my sound card has 64mb too, along with 4gb installed system ram.

now say I am playing 32bit games. which comes first of the 2gb limit? my vram or OS installed ram? how are they doing their magic in the background?

now as far as I can tell, in x64 windows will use 6gb or so ram, this includes my 4gb system ram and 2gb vid ram is addressed. but in 32bit apps, does this mean I only have access to 2gb total system ram, because of my vid ram is 2gb?
Comments have been disabled on this article.
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

Buy nowDigital Version