32bit software on 64bit OS & Ram

markusfarkas

Distinguished
Jun 24, 2009
2
0
18,510
Basically my question is this, I know that you can run 32bit programs on a 64bit OS. Can the 32bit program use more than 4Gigs of ram considering it's 32bit, or do I need the 64bit version to get over the 4Gig hump?
 

Beetlebox

Distinguished
Apr 19, 2009
37
0
18,540


Normally a 32-bit program will be limited to 2GB under 64-bit, if it is large address aware it can use up to 4GB.
 

markusfarkas

Distinguished
Jun 24, 2009
2
0
18,510
Thanks guys, so then if a program is 64bit, it may then use as much ram is it wants, otherwise it would be limited? I was planning on getting 8Gigs of ram, but unless I have the 64bit versions of the programs, it would be a waste?
 



The Operating system will have all RAM addressed at all times. As pointed out above, individual programs may have their own limitations, but that doesn't stop the OS from allocating (0~2GB) for one program, then allocating a different area (say, 2~4GB) for another. So no, it's not a waste.
 

rasmasyean

Distinguished
Mar 15, 2008
264
1
18,795
Some interesting hardcore Vista 64-bit info:
...all 64-bit versions of Microsoft operating systems currently impose a 16 TB limit on address space and allow no more than 128 GB of physical memory due to the impracticality of having 16 TB of RAM. Processes created on Windows Vista x64 Edition are allotted 8 TB in virtual memory for user processes and 8 TB for kernel processes to create a virtual memory of 16 TB.
http://zone.ni.com/devzone/cda/tut/p/id/5709


Ananogous to the above...32-bit is like 2GB / 2GB "virtual memory".

Physically, your usable RAM is reduced depending on the memory your other stuff takes. The biggest contributer to less usable physical RAM in 32-bit is the Video card, which tends to take a proportionatly large part of the 4GB address space.
 

Beetlebox

Distinguished
Apr 19, 2009
37
0
18,540

I'm probably being a tad pedantic here but the biggest contributor is the OS itself by restricting physical addressing to 4GB so we can't use the memory that is remapped above 4GB. ;)

If anyone is interested in these upper memory limits on 64-bit, W7 RC Ultimate has a 192GB limit. I wonder if MS will increase the 8GB and 16GB limit in 64-bit Vista Home Basic/Premium for W7 counterparts as I could easily imagine in a couple of years users with more memory than that asking why they cant use it all. :na:
 
The OS itself isn't resctricting anything when talking about 32-bit. Getting around the 32-bit 4GB limit is possible... but not practical on consumer OSes... which is why you only see it in server environments. PAE caused more problems than it fixed... and you needed special drivers to take advantage of it anyway. It's much easier to move to 64-bit and leave the limit behind.
 

mikrev007

Distinguished
Oct 28, 2008
264
0
18,790
Special drivers... I don't know about that. You need drivers that don't ignore the upper part of the physical address, which some apparently do.

"The OS itself isn't resctricting anything"

But it is.
 

Beetlebox

Distinguished
Apr 19, 2009
37
0
18,540

There are also restrictions in the Vista 64-bit versions. For instance 64-bit Home Basic has a 8GB RAM restriction while Ultimate has a 128GB restriction. There is no reason for Home Basic not to support more than 8GB other than money. Basic is cheaper so your restricted to use less memory than more costly versions. Fair enough.

Now the thing with the 32-bit versions is not only are we restricted to 4GB of RAM but the physical addressing is also limited to 4GB which means we cannot see the memory that is remapped above 4GB to make way for graphics memory, PCI etc. This means we cannot fully utilize our 4GB of RAM.


PAE is not the culprit here, AFAIK it was a number of badly written drivers which only seemed to come to notice sometime around XP SP1. Having tried the kernel mod test with 32-bit versions of Vista SP1, SP2 and Win 7 RC to enable more than 4GB of physical addressing while keeping the 4GB RAM limit in place I was able to utilize all 4GB of RAM. Other than the kernel mod, the system was the same as normal, no other modifications were made. At no time did I encounter any driver problems.


Yep, if we have no issues running 64-bit it's IMHO gotta be the way to go but we wont be leaving all the limits behind, just making them bigger. ;)
 
What I meant was 4GB is a limit of 32-bit, not of the OS. The limits imposed on 64-bit versions of Vista are OS imposed rather than a limit of 64-bit. I agree that the poorly-written drivers were the culprit rather than PAE... but it seems that writing PAE-aware drivers wasn't important to most vendors. There was full support for server versions of Windows... but not consumer versions.

Makes more sense to move resources to 64-bit rather than try to work around a non-self-imposed limit... at least in my opinion.
 

mikrev007

Distinguished
Oct 28, 2008
264
0
18,790


I think the point is that 4GB is not the limit because the OS is named "32-bit", but because the kernel is restricted to 4GB. There isn't really any difference in hardware-addressing this amount of physical memory between the two OSes.
 

CrAzY_ME

Distinguished
Dec 18, 2009
1
0
18,510

thats what i did, i got 8gb ram and 64 bit win 7 os, it reads all 8gb's but says it can only use 3.99? can someone help me out.