Vista support for 4 GB?

Redfoot

Member
Dec 16, 2004
77
0
0
Howdy all.

Simple question. Can Vista and XP support/address 4 GB of system memory, or is that reserved for the 64 bit OS space?

I have been reading a few articles lately as I am going to build a new rig when I get back from the sand box. I thought that XP and Vista supported 4 GB, especialy since it seems most of the mainstream motherboards in the past 5-7 years supported 4 GB (normally in 4 sticks). Now I have enough doubt to have the more educated fellows in here tell me the real deal.

So....I am buiding a Core Duo Box with Windows XP Pro for surfing and gaming. Is 2 GB the max the OS will see, or can I throw 4 in the sucker?

Thanks!

-Redfoot.
 

Genx87

Lifer
Apr 8, 2002
41,091
513
126
I dont remember off the top of my head the exact reason, but it has something to do with the memory management overhead or something. WinXP and Vista 32 bit will show less than 4GB in your machine. Vista 64 and WinXP64 can go above the 4GB limitation.

Interesting thing is with 32bit Win2003 and SP2, it shows all 4GB.

/shrug
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Please search; this gets asked daily.

32-bit Windows can sort of support 4GB -- usually you lose somewhere between 250MB and 750MB of address space to the BIOS and other such things (I'm sure some of the resident Linux pushers will come by to rant about how MS "crippled" the desktop versions of Windows to screw you :p).
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So....I am buiding a Core Duo Box with Windows XP Pro for surfing and gaming. Is 2 GB the max the OS will see, or can I throw 4 in the sucker?

4G is the max but because the hardware needs memory addresses to work it has to get them from somewhere and it takes them from the 4G point down so the more hardware resources you have the more memory you lose. So if you have a PCI-E video card with 512M of memorth that's 512M worth of addresses stolen right there. Most BIOSes have an option to remap the "lost" memory above the 4G mark so that you can still use it but 32-bit Windows clients will never touch memory addresses >4G so it still won't be accessilble unless you use a 64-bit Windows or Linux system.

I'm sure some of the resident Linux pushers will come by to rant about how MS "crippled" the desktop versions of Windows to screw you.

Well MS says it's to protect you from bad drivers that don't work well when given memory address >4G but that's crap because if they would have forced the issue the manufacturers would have just fixed their drivers.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Well MS says it's to protect you from bad drivers that don't work well when given memory address >4G but that's crap because if they would have forced the issue the manufacturers would have just fixed their drivers.
Kind of hard to do that if the developer of the crappy driver(s) in question no longer exists.

I'm sure there are crappy drivers written by companies that are still around, but forcing the issue may not be practical in all cases.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Kind of hard to do that if the developer of the crappy driver(s) in question no longer exists.

True, the only one I've heard actually having problems is nVidia. Overall I guess this is just another reason why I'm glad I have the source to virtually all of my drivers. =)

I'm sure there are crappy drivers written by companies that are still around, but forcing the issue may not be practical in all cases.

No doubt but one would think that any driver tested on Win2K3 server would work alright since it does support more memory. So that should mean that the only potentially problematic drivers will be those that would never be tested on a server like 3D cards, game pads, crappy Creative sound cards, etc.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Well MS says it's to protect you from bad drivers that don't work well when given memory address >4G but that's crap because if they would have forced the issue the manufacturers would have just fixed their drivers.

Sigh. You of all people should know that the above statement is false. The drivers all user 32bit pointers, you can't magically remap everything outside of the 4 gig range.

You can play some pagemapping tricks if your system supports 36bit or higher adddressing (many do, except most current laptops), and that is what PAE enables.

The issue YOU are refering to was the 2gig user/kernel split and many driver (long ago) checking for kernel addresses by doing a compare with 0x80000000. We no longer see that in drivers.

 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
I have been reading a few articles lately as I am going to build a new rig when I get back from the sand box. I thought that XP and Vista supported 4 GB, especialy since it seems most of the mainstream motherboards in the past 5-7 years supported 4 GB (normally in 4 sticks). Now I have enough doubt to have the more educated fellows in here tell me the real deal.

The real answer is 'it depends'. On almost all notebooks today (sans the new Santa Rosa ones) you can't access 4gig even with a 64bit OS, that is because they only support 32bit addressing.

On desktops, if your machine only supports 32bit addressing (this is hw addressing of the chipset) you have the same problem. If you support 36bit or higher addressing then its possible you can see all (or almost all) of the memory with a 32bit system in PAE mode.

However, my vote would honestly be to run Vista 64 on such a system (especially if you think you might go higher than 4gig in the future).

Bill

 

aka1nas

Diamond Member
Aug 30, 2001
4,335
1
0
Originally posted by: Nothinman

No doubt but one would think that any driver tested on Win2K3 server would work alright since it does support more memory. So that should mean that the only potentially problematic drivers will be those that would never be tested on a server like 3D cards, game pads, crappy Creative sound cards, etc.

All of those examples as wll as other peripherals often have rather buggy drivers, a decent chance of the manufacturer having gone out of business, and are relatively unlikely to be used on a server. Unfortunately, those devices are pretty common on desktop OSes.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The issue YOU are refering to was the 2gig user/kernel split and many driver (long ago) checking for kernel addresses by doing a compare with 0x80000000. We no longer see that in drivers.

No, apparently recent nVidia drivers does have problems on Win2K3 machines with >4G of memory. This is second hand information since I don't have such a machine but the source is pretty reliable.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
No, apparently recent nVidia drivers does have problems on Win2K3 machines with >4G of memory. This is second hand information since I don't have such a machine but the source is pretty reliable.

Actually recent Nvidia drivers have a problem with 4gig of memory, not >4gig. Apprarently it's an issue in SLI configurations but I dont have all the details either.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually recent Nvidia drivers have a problem with 4gig of memory, not >4gig. Apprarently it's an issue in SLI configurations but I dont have all the details either.

Unless you're using a 64-bit system one would assume that if they have a problem with 4G they have a problem with >4G since they're pretty much analogous on 32-bit Windows since you either have access to all of your memory (i.e. requiring access to >4G addresses) or not.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Unless you're using a 64-bit system one would assume that if they have a problem with 4G they have a problem with >4G since they're pretty much analogous on 32-bit Windows since you either have access to all of your memory (i.e. requiring access to >4G addresses) or not.

Actually it's completely different, and in neither case is 32bit windows accessing addresses >4gig (regardless of the number of times you post that :)) PAE support is handled by the memory manager, every driver and app on the system is still using 32bit addresses in that case.
 

cmdrdredd

Lifer
Dec 12, 2001
27,052
357
126
Originally posted by: Matthias99
Please search; this gets asked daily.

32-bit Windows can sort of support 4GB -- usually you lose somewhere between 250MB and 750MB of address space to the BIOS and other such things (I'm sure some of the resident Linux pushers will come by to rant about how MS "crippled" the desktop versions of Windows to screw you :p).

the search does not work properly. You ever try it? You have to browse through tons of messages to find what you actually searched for.
 

Matthias99

Diamond Member
Oct 7, 2003
8,808
0
0
Originally posted by: cmdrdredd
Originally posted by: Matthias99
Please search; this gets asked daily.

32-bit Windows can sort of support 4GB -- usually you lose somewhere between 250MB and 750MB of address space to the BIOS and other such things (I'm sure some of the resident Linux pushers will come by to rant about how MS "crippled" the desktop versions of Windows to screw you :p).

the search does not work properly. You ever try it? You have to browse through tons of messages to find what you actually searched for.

http://forums.anandtech.com/messageview...atid=42&threadid=2017721&enterthread=y

I just tried it. Searching titles/summaries for "vista 4gb" turned up about half a dozen threads. Hell, just paging back a day or two in the posts should turn up several.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually it's completely different, and in neither case is 32bit windows accessing addresses >4gig (regardless of the number of times you post that ) PAE support is handled by the memory manager, every driver and app on the system is still using 32bit addresses in that case.

If you have 4G of memory and remap a chunk of that above the 4G mark in order to use it all how else would Windows access that memory besides PAE?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
If you have 4G of memory and remap a chunk of that above the 4G mark in order to use it all how else would Windows access that memory besides PAE?

I didn't say it didnt' use PAE. However, in 32bit systems (Windows and Linux) at NO POINT is their any concept of 'memory mapped above the 4G mark'.

"Well MS says it's to protect you from bad drivers that don't work well when given memory address >4G but that's crap because if they would have forced the issue the manufacturers would have just fixed their drivers. "

And I pointed out that its' a 32bit system so every driver on the box is using 32bit addressing and not one of them can touch addrsses >4G. They are STILL 32 bit drivers, and as I'm sure you know a 32bit address can range from 0 to 4G. No boot switch is going to give 32bit numbers more range.

PAE mode supports 36 or higher bit addressing and maps memory into the 4gig range so it can be used. It goes back to how operating system map address space (what the pointers are seeing) to physical memory.

But the statement 'that doen't work well when given memory addresses >4G" is false, as that never happens on 32bit system (unless the app is using aew which was an old hack for >4gig systems and has nothing to do with drivers)

Bill
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I didn't say it didnt' use PAE. However, in 32bit systems (Windows and Linux) at NO POINT is their any concept of 'memory mapped above the 4G mark'.

If you have 4G or more of memory some of it is going to be above the 4G mark because of the addresses reserved for hardware.

But the statement 'that doen't work well when given memory addresses >4G" is false, as that never happens on 32bit system (unless the app is using aew which was an old hack for >4gig systems and has nothing to do with drivers)

But since the nVidia driver is running in kernel mode it has access to the physical addresses, right?
 

cmdrdredd

Lifer
Dec 12, 2001
27,052
357
126
Originally posted by: Matthias99
Originally posted by: cmdrdredd
Originally posted by: Matthias99
Please search; this gets asked daily.

32-bit Windows can sort of support 4GB -- usually you lose somewhere between 250MB and 750MB of address space to the BIOS and other such things (I'm sure some of the resident Linux pushers will come by to rant about how MS "crippled" the desktop versions of Windows to screw you :p).

the search does not work properly. You ever try it? You have to browse through tons of messages to find what you actually searched for.

http://forums.anandtech.com/messageview...atid=42&threadid=2017721&enterthread=y

I just tried it. Searching titles/summaries for "vista 4gb" turned up about half a dozen threads. Hell, just paging back a day or two in the posts should turn up several.

he asked about XP too which is not adressed by those threads.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
If you have 4G or more of memory some of it is going to be above the 4G mark because of the addresses reserved for hardware.

Maybe from a physical address line point of view, but from the point of view of any 32bit operating system using 32bit pointers all memory has to be in the 0-4gig range. Lets say you have 6gig on your box. Well it's easy to understand the first 4gig can map pretty much 1:1 from physical to logical addresses (they don't, but pretend that they do). Your presuming that the additional 2gig is accessed via pointers into the address space, but the pointers are limited to 32bit so they can't 'point' there. Instead part of that address space is remapped on an application by application basis. What you really wind up with is (as a crude example) kernel mode memory mapped from 2gig to 4gig (using 2 gig of memory) and the additional 4gig (0-2gig and 4-6gig) mapepd into the 0-2gig area (one process sees one one 2 gig chunk or memory, another process sees the other, no one process can ever see more than 4gig since all pointers are limited to 32bit.).

In actuality the mappings aren't done that crudely, but instead at the page level. But no one thing ever sees more than 4gig (including the kernel, albeit it does understand the pool of pages is larger than the address space and does the appropriate mappings at the right time). This is really what PAE is, the kernel remapping the extra memory into the address space of processes to it can fairly effectively used.

But since the nVidia driver is running in kernel mode it has access to the physical addresses, right?

No, its a 32bit driver, all of its work needs to be mapped somewhere into that space. It has no concept of memory 'higher' than that as it has no way of accessing it.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
That all makes sense but how do you explain the fact that the nVidia drivers have(had?) issues with Win2K3 boxes with that much memory in them? And why wouldn't MS make XP32 let you use PAE to access the relocated memory if you have up to 4G?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Nothinman
That all makes sense but how do you explain the fact that the nVidia drivers have(had?) issues with Win2K3 boxes with that much memory in them?

I'd have to know more about the bug but it's not uncommon, from MS:

The primary driver compatibility concern is running Physical Address Extension (PAE) mode on 32-bit systems. PAE mode enables processors to address greater than 4 gigabytes (GB) of memory. The primary difference between PAE memory paging and non-PAE memory paging schemes is the extra level of paging that is required in PAE mode (3 levels instead of 2).

...

Other drivers might load in PAE mode but cause system instability by directly modifying system page table entries (PTEs). These drivers expect 32-bit PTEs, but receive 64-bit PTEs in PAE mode instead.

The above is the most likely cause if they are blowing with >4gig...

And why wouldn't MS make XP32 let you use PAE to access the relocated memory if you have up to 4G?

Again, from MS: The largest driver PAE compatibility issue involves direct memory access (DMA) transfers and map register allocation. Many devices that support DMA, usually 32-bit adapters, are not capable of performing 64-bit physical addressing. When run in 32-bit mode, the device can address all physical address space. In PAE mode, it is possible that data would be present at a physical address greater than 4 GB. To allow devices with these constraints to function in this scenario, The Windows 2000 Server family and later provide double-buffering for the DMA transaction by providing a 32-bit address that is indicated by a map register. The device can perform the DMA transaction to the 32-bit address and the kernel copies the memory to the 64-bit address that is provided to the driver.

When the system runs with PAE disabled, drivers for 32-bit devices never require their map registers to be backed by real memory. This means that double-buffering is not necessary, since all devices and drivers are contained within the 32-bit address space. Based on testing of drivers for 32-bit devices on 64-bit processor?based computers, it is expected that most client-tested, DMA-capable drivers expect unlimited map registers.

To constrain compatibility issues, Windows XP Service Pack 2 includes hardware abstraction layer (HAL) changes that mimic the 32-bit HAL DMA behavior. The altered HAL grants unlimited map registers when the system is running in PAE mode. In addition, the kernel memory manager ignores any physical address above 4 GB. Any system RAM beyond the 4 GB barrier would be made unaddressable by Windows and be unusable in the system.
By limiting the address space to 4 GB, devices with 32-bit DMA bus master capability will not see a transaction with an address above the 4 GB barrier. Because these changes remove the need to double-buffer the transactions, they avoid a class of bugs in some drivers related to proper implementation of double buffering support

My personal view on all this is MS provided as many bandaids as they reasonably could while still providing compatibility. Xp64 and now Vista64 is the real route to 4gig and above...

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Other drivers might load in PAE mode but cause system instability by directly modifying system page table entries (PTEs). These drivers expect 32-bit PTEs, but receive 64-bit PTEs in PAE mode instead.

That's retarded, why would any driver directly modify the system PTEs on it's own? That's assuming that whatever functions Windows exports to manipulate the PTEs aren't to blame because they hand out different sized entries depending on whether or not PAE is enabled.

Xp64 and now Vista64 is the real route to 4gig and above...

You mean 3G, 3.2G or whatever your hardware configuration permits. And I don't disagree with you but since MS says that XP32 supports up to 4G everywhere don't you think it's reasonable that people expect to be able to use the full 4G now that they can afford it? Having to buy a new Windows license just to use all of the hardware that you bought is BS in general but it's even worse when the box says it'll work when it really won't.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
That's retarded, why would any driver directly modify the system PTEs on it's own? That's assuming that whatever functions Windows exports to manipulate the PTEs aren't to blame because they hand out different sized entries depending on whether or not PAE is enabled.

I stopped wondering why certain driver writers did anything after a few plugfests ;)

Xp64 and now Vista64 is the real route to 4gig and above...
You mean 3G, 3.2G or whatever your hardware configuration permits. And I don't disagree with you but since MS says that XP32 supports up to 4G everywhere don't you think it's reasonable that people expect to be able to use the full 4G now that they can afford it? Having to buy a new Windows license just to use all of the hardware that you bought is BS in general but it's even worse when the box says it'll work when it really won't.[/quote]

I dont really disagree, just pointing out the realties of the situation :)