Ben, perhaps I misinterpreted the article that Axton posted 
(http://msdn.microsoft.com/en-us/library/aa366912%28VS.85%29.aspx).  In that 
article, it says the following:

After 4GT is enabled, a process that has the 
IMAGE_FILE_LARGE_ADDRESS_AWARE<http://msdn.microsoft.com/en-us/library/ms680349(VS.85).aspx>
 flag set in its image header will have access to the additional 1 GB of memory 
above the low 2 GB.

That seems to indicate that something is different about the process, or that 
something specific has to be done in order for the process to be able to access 
the extra gig of memory (beyond configuring the OS with the /3gb switch).  I 
figured that was probably a compile-time option, but I accept that I could be 
wrong.  Do you know how that flag gets set for a process in its image header?

Thanks,
Lyle

From: Action Request System discussion list(ARSList) 
[mailto:arsl...@arslist.org] On Behalf Of Ben Chernys
Sent: Thursday, November 19, 2009 3:23 AM
To: arslist@ARSLIST.ORG
Subject: Re: JVM output -- only sees 2GB - but machine has 4GB?

**
The line by Lyle is incorrect.  A 32 bit program can address 32 bits - not 31!. 
 There are no special compiler switches needed to allow you to address higher 
than 2Gb.

That being said, the OS shares some of your address space.  Windows, will 
allocate 2Gb of real memory for its own use and limit the virtual address space 
for any single process to 2Gb by default.  This can be changed with the /3gb 
switch in c:\boot.ini

John, your interpretation of the article is also incorrect.  Specifically, you 
say "It seems as if ALL programs together under windows can only take 2GB.   So 
- if I have 3 programs each take 1GB -- I would have a problem -- even though I 
have 4GB."

You would have a performance problem, not necessarily a memory problem, though 
I have seen Windows deny mallocs when it was reorganising it's own memory usage 
even though there was plenty of "memory" - ie disk space - available.

The KB article states that EACH process can address "typically" 2GB of space 
and the article goes on to talk about addressing MORE than 4GB on a 32 but 
machine which is more than a 32 bit word can address.

The article also talks about the /3GB switch which I describe a bit below.  To 
enable it, add it to the C:\boot.ini file as in

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" 
/fastdetect /3GB

With this configuration, Windows own use of virtual addresses is limited to 1Gb 
and any application can address 3Gb of virtual space.  I use this config in a 
lap-top of 4gb where I run a VM Windows 2003 server with ITSM and have the VM's 
memory resident  (non-swappable IF Windows agrees) in the host OS.  This gives 
me excellent VM performance, as well as allowing me to run a host of other apps 
such as Visual C, Outlook with a 1gb mail file, Word, etc.

This does affect performance in odd ways when you are running many different 
memory hungry applications (such as MS Word) but it is relatively standard for 
32 bit servers running only server type applications (such as Oracle / Remedy 
etc).

Microsoft has a few articles on it.  Look for the /3gb switch.

Cheers
Ben Chernys



 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: "Where the Answers Are"

Reply via email to