32-bit App with LARGEADDRESSAWARE running on Win7-64

I have built my 32-bit windows application with the LARGEADDRESSAWARE linker option.  I then run this application on a win7-64bit OS PC.   Watching Task Manager and keeping an eye on peak memory utilization by my application's process, I see that it seems to be able to grab up to "slightly over 3 GB" - the max looks to be something like 3.1GB.  Trying to get more than that I get an "out of memory" error.  I had thought the limit would be 4GB.  Why is it 3.1GB?
Is there a way to get up tp 4GB?
tullheadAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
>>I had thought the limit would be 4GB.  Why is it 3.1GB?

The reason is that the system resources take up the remaining address space up to the theorhetical 4GB, in particular the addresses the PCI bus uses and most notably the AGP address space.
jkrCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tullheadAuthor Commented:
Would my apparent limit ( 3.1 GB ) vary from computer to computer, perhaps due to a different video card in one PC versus another?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

jkrCommented:
No, not really - at least you won't get the full 4GB. BTW, that was my main reason to ditch W7/32 in favour of W7/64, since that "4GB Physical RAM, 3.xGB usable" simply hurt too much.
tullheadAuthor Commented:
In my case, I can exist (just barely) in this 3.1GB space -- I am image processing files that are nearly 700 MB in size -- so things are OK.  But I dread it suddenly not working on some PC because on that particular PC, for whatever reason, it can't grab 3.1 GB.

In the meantime, I'm starting my port to 64-bits.
jkrCommented:
Um, the usable address space per process is 2GB, you can go up to 3GB by adding '/3GB' to your boot.ini, see http://msdn.microsoft.com/en-us/windows/hardware/gg487508 ("Memory Support and Windows Operating System")

The /3GB switch allocates 3 GB of virtual address space to an application that uses IMAGE_FILE_LARGE_ADDRESS_AWARE in the process header. This switch allows applications to address 1 GB of additional virtual address space above 2 GB.
tullheadAuthor Commented:
This /3GB stuff, as I understand it, applies to running on a 32-bit OS, so that you can get 3GB instead of 2GB.  But in my case, we are happy to run on a 64-bit OS, and get 3.1 GB for this 32-bit app.  We just use the linker option /LARGEADDRESSAWARE and no need to do the /3GB thing.  Correct?
tullheadAuthor Commented:
I think its correct because its working!
jkrCommented:
Ah, OK - yet a 32bit process still is limited that way, even when running on WOW64 - yet the '/GB' have no effect there...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.