EMP
EMP

Reputation: 61971

How can a 32-bit process use nearly 4GB memory?

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?

Upvotes: 2

Views: 2042

Answers (1)

Alexei Levenkov
Alexei Levenkov

Reputation: 100547

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? .

Upvotes: 2

Related Questions