From: jorgen on
Bo Persson wrote:

> But it IS available, it is up to the application to be able to use it.

Yes, if the LARGEADDRESSAWARE flag is set
From: Charlie Russel - MVP on
clearly you did.

The problem is that we're talking about two different things here. And
neither of them is RAM.

One is the ability of a 32-bit application to use >2GB of memory address
space. Unless it is compiled with the LARGEMEMORYADDRESSAWARE flag, it
simply can't. Full stop.

The second is the availability of memory address space to an application
from the OS. In 32-bit Windows, there is a TOTAL of 4GB of flat virtual
memory address space. That is normally divided 2GB for the OS, and 2GB for
applications. In x64 Windows, there is a total of 16 TB of flat virtual
memory address space. (yes, I said TB!) That is divided 8 TB for the OS, and
8 TB for applications.

If an application is compiled using the LARGEMEMORYADDRESSAWARE flag, then
it can see >2GB of virtual memory address space IFF (if and only if) the OS
makes that memory address space available to the application. With _some_
versions of 32-bit Windows, that is possible using the /3GB switch. There's
a price for using that switch - you've now starved the OS itself from having
enough virtual memory address space to function optimally, since it only has
4 GB of virtual memory address space in total available. With 64-bit
Windows, each 32-bit application gets it's own 4 GB of virtual memory
address space (via WOW64).


Just so you're aware, several of the whitepapers up on microsoft.com on x64
Windows are ones that I wrote for them.
--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"jorgen" <na(a)invalid> wrote in message
news:essZhfjTIHA.1208(a)TK2MSFTNGP03.phx.gbl...
> jorgen wrote:
>> Charlie Russel - MVP wrote:
>>> No, the Application GETS 4 GB in x64. It it can't USE or SEE the 4GB
>>> unless the application is compiled accordingly. But the memory address
>>> space is allocated regardless. This is _different_ from 32-bit Windows,
>>> where the application only GETS 2GB unless you boot with the /3GB
>>> switch.
>>
>> That can very easily be misunderstood. I wouldn't use the word GET, when
>> it is not available to the application.
>
> "and every 32-bit application automatically has a full 4GB of memory
> address space available to it. "
>
> maybe i just misunderstood that part. I thought you claimed that all
> applications would get 4GB with or without the LARGEADDRESSAWARE flag

From: Bo Persson on
jorgen wrote:
:: Bo Persson wrote:
::
::: But it IS available, it is up to the application to be able to
::: use it.
::
:: Yes, if the LARGEADDRESSAWARE flag is set

That is a statement of conformance, the program must also be ABLE to
use the extra space.

http://blogs.msdn.com/oldnewthing/archive/2004/08/12/213468.aspx



Bo Persson


From: jorgen on
Charlie Russel - MVP wrote:
> clearly you did.
>
> The problem is that we're talking about two different things here. And
> neither of them is RAM.

We are actually talking about the same thing. And I do differentiate
between RAM, physical address space, virtual address space, between user
space and kernel space etc.

I just thought you said, that every 32-bit application automatically was
able to grow to 4GB in 64-bit Windows - even without the flag in the
image header. Nothing more than that :)
From: jorgen on
Bo Persson wrote:

> That is a statement of conformance, the program must also be ABLE to
> use the extra space.
>
> http://blogs.msdn.com/oldnewthing/archive/2004/08/12/213468.aspx

Yes, I'm aware of that. But if the flag is NOT set, the application
won't be able to grow beyond 2GB. That was the confusion in the thread :)