Here's a question. How much memory will a 32bit application use on a 64bit machine?

Soldato
Joined
28 Sep 2008
Posts
14,207
Location
Britain
If I use to invoke the /pae /userva switch on a 32bit server to allow maximum address space for an application, what happens when I move that application to a x64 machine?

Does it just use as much memory as it wants, or will ultimately the application itself limit how much memory it uses?
 
if the application is a 32bit app, then it will only ever run in 32bit mode.

moving the app to a 64bit machine wont increase the ram that the program uses.

It will however stop the system from impeding on allocating the full amount of RAM that it can handle. meaning that the app MIGHT run better.

weather you'll actually see any difference is questionable...


if that makes any sense...
 
i would hassard a guess as no.

But I could well be wrong. You're thinking and reasoning is sound. can you try it and see??
 
I think it might be only 2GB for a 32-bit app.

Which leads me to the question as to why bother with a pae userva switch if the app will actually only ever use 2Gbs.

I understand you use the above switches to allow the app to use 3Gb and the OS to use the rest (in simple terms)
 
Does it just use as much memory as it wants, or will ultimately the application itself limit how much memory it uses?

It's ultimately down to the application itself. 32-bit processes with the large address space aware option will be able to address up to 4GB virtual address space when executing on Windows x64, otherwise they will be limited to 2GB of virtual address space. The good thing about running 32-bit processes which are large address space aware on Windows x64 is you don't need to worry about manually increasing the virtual address space by either using the /3GB switch or the increaseuserva option, which could potentially cause issues because by doing so, you're reducing the amount of virtual address space available for the system itself. They will also have access to 4GB on Windows x64 as opposed to 3GB on Windows x86.

64-bit processes with the large address space aware option will have access up to 8 terabytes of virtual address space, otherwise they too are also limited to a 2GB of virtual address space. All though, I believe the large address space aware option should be the default in x64 world.

References:
 
To be honest I am not sure. You could checkout Mark Russinovich's blog - he had a series on Windows memory management.
 
Which application is it?

As far as I knew, PAE support needs to be written into the app and not many do.

There isn't anything known as an application which supports Physical Address Extension. PAE is simply a mechanism which allows Windows 32-bit to address much large quantities of physical memory. There is nothing applications need to do to take advantage of this. Whilst 32-bit processes will still be limited to a 2GB of virtual address space, or up to 3GB by using the 4-gigabyte tuning (4GT) feature, the system can still benefit from the increased physical memory due to being able to support more processes which their working sets may have not otherwise fit in 4GB of physical memory, as well as other reasons like caching.

There is something called Address Windowing Extension (AWE) which can further take advantage of the increased physical memory capacity due to PAE. Applications which are using AWE functions, it enables them to access more physical memory than what would otherwise be available from standard 32-bit process addressing.
 
It's ultimately down to the application itself. 32-bit processes with the large address space aware option will be able to address up to 4GB virtual address space when executing on Windows x64, otherwise they will be limited to 2GB of virtual address space. The good thing about running 32-bit processes which are large address space aware on Windows x64 is you don't need to worry about manually increasing the virtual address space by either using the /3GB switch or the increaseuserva option, which could potentially cause issues because by doing so, you're reducing the amount of virtual address space available for the system itself. They will also have access to 4GB on Windows x64 as opposed to 3GB on Windows x86.

64-bit processes with the large address space aware option will have access up to 8 terabytes of virtual address space, otherwise they too are also limited to a 2GB of virtual address space. All though, I believe the large address space aware option should be the default in x64 world.

References:

There isn't anything known as an application which supports Physical Address Extension. PAE is simply a mechanism which allows Windows 32-bit to address much large quantities of physical memory. There is nothing applications need to do to take advantage of this. Whilst 32-bit processes will still be limited to a 2GB of virtual address space, or up to 3GB by using the 4-gigabyte tuning (4GT) feature, the system can still benefit from the increased physical memory due to being able to support more processes which their working sets may have not otherwise fit in 4GB of physical memory, as well as other reasons like caching.

There is something called Address Windowing Extension (AWE) which can further take advantage of the increased physical memory capacity due to PAE. Applications which are using AWE functions, it enables them to access more physical memory than what would otherwise be available from standard 32-bit process addressing.

<3

done all the hard work for me! :D
 
Back
Top Bottom