I recently received a comment from a reader who thought Vista didn’t support 4GB of RAM. I was a bit dismayed at first because 32-bit flavors of Window support 4GB, and they always have (nitpickers: I’m mean 32-bit NT, not 9X). I had taken it for granted that people just know this. I google’d around a bit to try and better understand this misconception. After a few minutes I realized there sure is some confusion over how much RAM 32bit Vista actually supports. I hope I can clear up some misconceptions, shed a bit of light, and not bore you too terribly along the way.
Techno-babble disclaimer! A 32-bit number can contain a value between 0 and 4,294,967,295 (this number is calculated as: 2^32 -1). Because that’s a very large and unwieldy number, we divide it by 1024 which gives us 4,194,304 thousand. Dividing again by 1024 gives us 4,096 million. Dividing once more by 1024 gives us 4 billion. What I am trying to get at is this: a 32-bit number can be used to count up to 4 billion, which is needed to read/write 4 billion distinct memory cells (aka bytes).
Because 32-bit Windows addresses memory through a 32-bit memory addressing scheme, in theory you can address 4GB of RAM in 32-bit Windows. I say in theory, because there are other factors that move this number up or down. Useless techno-trivia: A 64-bit memory addressing scheme can theoretically access 64-bit of memory address space: which is 2^64 – 1, this comes out to: 18,446,744,073,709,551,615 or roughly 4 billion GB.
In 32-bit Windows, addressable memory is divided into two different areas (or modes): Kernel and User. By default, Kernel-mode gets half of the maximum addressable memory: 2GB, and User-mode gets the other half: 2GB. Windows dedicates Kernal-mode memory to drivers and internal Windows data. And, Windows applications get access to 2GB of User-mode memory. (nitpickers: simplified).
When it comes to physical hardware, things get more muddy. It’s fairly common for motherboard (aka mainboard) makers to set hardware limitations on how much RAM they actually support. Your computer’s mainboard may limit accessible RAM to: 3GB, 2.5GB 2GB, etc. On server-class machines you can find motherboards that limit accessible RAM to more: 8GB, 16GB, etc. Since a 32-bit number can only address 4GB of RAM, there are various schemes enabling 32-bit Windows to access more than 4GB of RAM. Microsoft, Intel and various server motherboard manufacturers have extended memory addressing schemes.
Intel has PAE, Microsoft has AWE These extended memory access schemes in general work by moving around a virtual window through your physical address space. For example: I can read the memory between addresses 10GB and 14GB by setting my memory window to start at 10GB. Since we’re moving a memory read/write window around, we pay a slight performance fee.
So, 32-bit Windows can theoretically take advantage of 4GB of RAM and 32-bit Vista is no different. What is different is how Vista uses the RAM and reports what’s available. In Vista, if you have 4GB of RAM and 512MB graphics card, then your available RAM can show 3.5 GB or less. You are still using all 4GB of RAM, but Vista is really trying to be honest by saying you only have 3.5 available. If you have other drivers that grab RAM, that will decrease the amount of available RAM even more. I’ve read some peoples complaints where they only see 3 GB available and 4GB is installed. It depends on your motherboard, installed hardware, drivers, and etc.
If you want more info, check out Microsoft’s: Memory Limits for Windows Releases.