About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

  • Thread starter Thread starter InputIO
  • Start date Start date
I

InputIO

Guest
Hy guys!

i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
installed and have read that exist a option called "/LARGEADDRESSAWARE" that
can use for improve the memory allocation for my application.

The question is : how i can enable this option ? In boot.ini as the /3G on
x86?

Thanks in advance.
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Unless I am mis-interpreting something, your information is
not entirely correct.

If you go to www.microsft.com and enter 'LARGEADDRESSAWARE'
in the search box you will be given links to information
indicating this is a programming option for the linker at
compile time.


InputIO wrote:
> Hy guys!
>
> i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
> installed and have read that exist a option called "/LARGEADDRESSAWARE"
> that can use for improve the memory allocation for my application.
>
> The question is : how i can enable this option ? In boot.ini as the /3G
> on x86?
>
> Thanks in advance.
>
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Hi Theo,

thanks for your reply !

I try to read some KB Articles but not understand how to enable the
"LARGEADDRESSAWARE" option.

The question is : i need edit a boot.ini file and add /LARGEADDRESSAWARE
after the sting multi(0)disk(0)rdisk(0).... ?!!?!?!

Thanks in advance.




"Theo" <theo@discussions.microsoft.com> ha scritto nel messaggio
news:Ob3rmTiTIHA.4272@TK2MSFTNGP06.phx.gbl...
> Unless I am mis-interpreting something, your information is not entirely
> correct.
>
> If you go to www.microsft.com and enter 'LARGEADDRESSAWARE' in the search
> box you will be given links to information indicating this is a
> programming option for the linker at compile time.
>
>
> InputIO wrote:
>> Hy guys!
>>
>> i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
>> installed and have read that exist a option called "/LARGEADDRESSAWARE"
>> that can use for improve the memory allocation for my application.
>>
>> The question is : how i can enable this option ? In boot.ini as the /3G
>> on x86?
>>
>> Thanks in advance.
>>
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Hi,
LARGEADDRESSWARE is not an option (or switch) in BOOT.INI
As Theo mentioned, it is used along with the compiler, it doesn't have
anything to do with W2K3.

More info can be found
http://blogs.msdn.com/oldnewthing/archive/2004/08/12/213468.aspx
http://www.eggheadcafe.com/community/aspnet/2/81127/largeaddressaware-issue.aspx
and elsewhere on the web by googling "LARGEADDRESSWARE switch compiler"

Carlos
"InputIO" wrote:

> Hi Theo,
>
> thanks for your reply !
>
> I try to read some KB Articles but not understand how to enable the
> "LARGEADDRESSAWARE" option.
>
> The question is : i need edit a boot.ini file and add /LARGEADDRESSAWARE
> after the sting multi(0)disk(0)rdisk(0).... ?!!?!?!
>
> Thanks in advance.
>
>
>
>
> "Theo" <theo@discussions.microsoft.com> ha scritto nel messaggio
> news:Ob3rmTiTIHA.4272@TK2MSFTNGP06.phx.gbl...
> > Unless I am mis-interpreting something, your information is not entirely
> > correct.
> >
> > If you go to www.microsft.com and enter 'LARGEADDRESSAWARE' in the search
> > box you will be given links to information indicating this is a
> > programming option for the linker at compile time.
> >
> >
> > InputIO wrote:
> >> Hy guys!
> >>
> >> i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
> >> installed and have read that exist a option called "/LARGEADDRESSAWARE"
> >> that can use for improve the memory allocation for my application.
> >>
> >> The question is : how i can enable this option ? In boot.ini as the /3G
> >> on x86?
> >>
> >> Thanks in advance.
> >>

>
>
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

InputIO wrote:
> Hy guys!
>
> i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
> installed and have read that exist a option called "/LARGEADDRESSAWARE"
> that can use for improve the memory allocation for my application.


First: it is only used with 32-bit programs.

editbin is one tool that can set the flag. It comes with visual studio.

> The question is : how i can enable this option ? In boot.ini as the /3G
> on x86?


That option is for 32-bit Windows only. In 64-bit the application
automatically gets 4GB of virtual address space when the
LARGEADDRESSAWARE flag is set in the image header
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

"LARGEMEMORYADDRESSAWARE" is a flag used by the developer compiling a 32-bit
application to enable it to see >2GB of memory. The operating system needs
to make that memory available to the 32-bit application if it asks for it.
With Windows x64 Edition, you don't need to do ANYTHING to allow that 32-bit
application to see >2GB of memory. It happens automatically, and every
32-bit application automatically has a full 4GB of memory address space
available to it. If you're running a 32-bit application, you need to add a
/3GB switch to your boot up string in boot.ini to allow 32-bit applications
to see 3GB of virtual memory address space. That switch is unnecessary in
x64 Windows.

As an end user or administrator, there is nothing you need to do, or can do,
about LARGEMEMORYADDRESSAWARE. That is purely a developer flag.

--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"InputIO" <InputIO@xxx.com> wrote in message
news:eps0ANiTIHA.6036@TK2MSFTNGP03.phx.gbl...
> Hy guys!
>
> i have a server with windows server 2003 ent. x64 Sp2 with 4Gbyte RAM
> installed and have read that exist a option called "/LARGEADDRESSAWARE"
> that can use for improve the memory allocation for my application.
>
> The question is : how i can enable this option ? In boot.ini as the /3G
> on x86?
>
> Thanks in advance.
>
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Charlie Russel - MVP wrote:
> With Windows x64 Edition, you don't need to do ANYTHING
> to allow that 32-bit application to see >2GB of memory. It happens
> automatically, and every 32-bit application automatically has a full 4GB
> of memory address space available to it.


Just to clear that up. I say something else in my post.

http://support.microsoft.com/kb/888732

Unless the flag in set, the application only gets 2GB in both 32-bit and
64-bit Windows
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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.

--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"jorgen" <na@invalid> wrote in message
news:en2gCIjTIHA.2000@TK2MSFTNGP05.phx.gbl...
> Charlie Russel - MVP wrote:
>> With Windows x64 Edition, you don't need to do ANYTHING to allow that
>> 32-bit application to see >2GB of memory. It happens automatically, and
>> every 32-bit application automatically has a full 4GB of memory address
>> space available to it.

>
> Just to clear that up. I say something else in my post.
>
> http://support.microsoft.com/kb/888732
>
> Unless the flag in set, the application only gets 2GB in both 32-bit and
> 64-bit Windows
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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.
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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.

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


Bo Persson
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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@invalid> wrote in message
news:essZhfjTIHA.1208@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
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

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 :)
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Sorry but i still to don't understand.... :-(

1 case : 32 bit application on windows server x64

in this case it's mandatory compile my application with the flag
/LARGEADDRESSAWAR for see >2 Gb of memory or not ?


2 case: 64 bit aplication on windows server x64

in this case i need make anything on my server or my application for use
more than 2GB ?



3 case : 23 bit application on window server 32 bit

in this case after set the /3GB flag in boot.ini i nedd make anything on my
server or application for use more than 2GB ?


Thanks in advance.

bye :)



"jorgen" <na@invalid> ha scritto nel messaggio
news:ee$4$1jTIHA.4696@TK2MSFTNGP05.phx.gbl...
> 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 :)
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

InputIO wrote:
:: Sorry but i still to don't understand.... :-(
::
:: 1 case : 32 bit application on windows server x64
::
:: in this case it's mandatory compile my application with the flag
:: /LARGEADDRESSAWAR for see >2 Gb of memory or not ?

Yes.

::
::
:: 2 case: 64 bit aplication on windows server x64
::
:: in this case i need make anything on my server or my application
:: for use more than 2GB ?

No.

::
::
::
:: 3 case : 23 bit application on window server 32 bit
::
:: in this case after set the /3GB flag in boot.ini i nedd make
:: anything on my server or application for use more than 2GB ?

You still need the /LARGEADDRESSAWARE flag, for the application to
even attempt to use > 2GB.


Bo Persson
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

There's a bit of confusion in this thread, although the technical details
came out fine in the end.

To sum up:

- 32-bit applications can opt-in to use >2 GB of virtual address space by
using /LARGEADDRESSAWARE when they are built by the developer. There are
some compataiblity implications that the developer must handle correctly to
support this, which is why by default 32-bit applications never get more
than 2 GB in the first place. Just forcing this on by using editbin could
easily result in corruptions, crashes, or other major failures.

- Such applications will only actually be able to allocate >2 GB if the OS
they are running on is also configured to support this. For 32-bit versions
of Windows, this requires special boot modes and even then can never get
more than a total of 3 GB. For 64-bit versions of Windows, there is NO
special boot mode required and can grow to a full 4 GB. Standard 32-bit
applications (i.e., those without /LARGEADDRESSAWARE) will still never get
>2 GB no matter how the OS is configured.


- 64-bit applications always have access to at least 8 TB of virtual address
space.

How much physical RAM an application uses is a slightly different matter,
but as an approximiation you need as much Virtual Address Space as you have
physical memory allocated at a given time plus some more for other things
like memory-mapped files, Direct3D devices, EXE and DLL size, etc.

There's a nice summary of this in the DirectX SDK article "64-bit
programming for Game Developers"
http://msdn2.microsoft.com/en-us/library/bb147385.aspx ,as well information
in many of the whitepapers Charlie pointed to on MSDN's websites.

--
Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Re: About "LARGEADDRESSAWARE" option in W2K3 SP2 x64

Bo is correct on all three points.

--
Charlie.
http://msmvps.com/xperts64
http://mvp.support.microsoft.com/profile/charlie.russel


"InputIO" <InputIO@xxx.com> wrote in message
news:eUM8CNuTIHA.4272@TK2MSFTNGP06.phx.gbl...
> Sorry but i still to don't understand.... :-(
>
> 1 case : 32 bit application on windows server x64
>
> in this case it's mandatory compile my application with the flag
> /LARGEADDRESSAWAR for see >2 Gb of memory or not ?
>
>
> 2 case: 64 bit aplication on windows server x64
>
> in this case i need make anything on my server or my application for use
> more than 2GB ?
>
>
>
> 3 case : 23 bit application on window server 32 bit
>
> in this case after set the /3GB flag in boot.ini i nedd make anything on
> my server or application for use more than 2GB ?
>
>
> Thanks in advance.
>
> bye :)
>
>
>
> "jorgen" <na@invalid> ha scritto nel messaggio
> news:ee$4$1jTIHA.4696@TK2MSFTNGP05.phx.gbl...
>> 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 :)

>
 
Back
Top