How much memory can an x86 executable use on a 64-bit?

advertisements

I think that the question sounds clear, but for further explanation:

Suppose we have Windows 7 x64 PC with 8GB of RAM installed on it; (64bit OS with 32bit process is my intention)

Question 1: how much memory can a 64bit process use in this environment?

Question 2: how much memory can a 32bit process use in this environment?

Question 3: If a 32bit process can only use 2GB of RAM in this environment,(even if it is LARGE ADDRESS SPACE AWARE: 3gb), however most games are 32bit;, so does this mean that: Although we have 8gb of RAM installed, that a game for example can only use 2-3gb of RAM at any given time?


Question 1: how much memory a 64bit process can use in this environment?

It can use all of your memory.

Question 2: how much memory a 32bit process can use in this environment?

For x86 executable on x64 machine it consumes by default 2GB. If IMAGE_FILE_LARGE_ADDRESS_AWARE is set it can use 4GB.MSDN.

Interesting thing is an x64 executable can use at most 2GB on a x64 machine if IMAGE_FILE_LARGE_ADDRESS_AWARE is not set or cleared.

Question 3: (I'm not sure) If a 32bit process can only use 2GB of ram in this environment,(even if it is LARGE ADDRESS SPACE AWARE: 3gb), and on the other hand (as far as I know) most of the games are 32bit;, so does this mean that: Although we have 8gb of RAM installed, that (for example game) can only use 2-3gb of RAM at any given time????

No its 4GB