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?
 
jkrConnect With a Mentor Commented:
0
 
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.
0
 
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?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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.
0
 
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.
0
 
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.
0
 
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?
0
 
tullheadAuthor Commented:
I think its correct because its working!
0
 
jkrCommented:
Ah, OK - yet a 32bit process still is limited that way, even when running on WOW64 - yet the '/GB' have no effect there...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.