2

I thought that a 32-bit process could use at most 2GB RAM, since half the address space is reserved for the OS (maybe 3GB with the /3GB switch). However, StarCraft II manages to use nearly 4GB and it's a 32-bit EXE. Process Explorer shows:

4,000,896 KB private bytes
3,928,164 KB working set

How does it do that and how can I do it in my own programs? Is it possible in .NET? In unmanaged C++? In managed C++ somehow?

EMP
  • 59,148
  • 53
  • 164
  • 220

1 Answers1

2

On 64bit OS 32bit process can use almost 4GB.

Processes marked as "large address space aware" can use up to 3GB in 32bit OS and up to full address space on 64bit OS.

Here is more discussion on it: Can a 32bit process access more memory on a 64bit windows OS? .

Community
  • 1
  • 1
Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
  • Thanks, that explains. I suppose there is no .NET equivalent? – EMP Jun 30 '12 at 04:57
  • 1
    It should be supported... And here is a questions with info how to do it http://stackoverflow.com/questions/1346480/how-to-make-a-net-application-large-address-aware (I thought there is an option in VS/CSC, but no - need to use editbin the same as Win32 app). – Alexei Levenkov Jun 30 '12 at 05:02