• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

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?
0
tullhead
Asked:
tullhead
  • 5
  • 4
1 Solution
 
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
 
jkrCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now