Can 32bit Software Access More Than 4GB of RAM?

I was reading on the Sims website that the latest pack was causing “software leaks” and some users claiming the pack had a memory leak and was using all 16GB of his RAM.

Now I know the Sims is a 32bit game, and I thought that the maximum amount of RAM a 32bit application could address was 4GBs.

Is it a matter of “addressing” versus “using” or could it use more or reserve more if it’s corrupted. These are people playing the game on 64bit Windows machines, all complaining were WIN7 users.

But I was thinking maybe they are reading the task manager wrong.

Anyway as a general question rather than a specific game question, I was wondering as well.

on 32-bit windows, a single process can only “see” a 4 GB virtual address space. Further, that address space is split in half between the process and the kernel, so it can only actually access 2 GB.

on 64-bit windows, a 32-bit process gets the same “net” 2 GB unless it was compiled with the /LARGEADDRESSAWARE flag, in which case it can get the entire 4 GB. I can’t think of any situation where a 32-bit process can gobble up 16 GB unless multiple processes are going loony at the same time.

I don’t know anything about Windows architecture but if a 32-bit process requests heap space, will the OS allocate it even if the process can’t actually address it? If so that could be a source of a memory leak like that.

Read up on physical address extension:
“The Linux kernel includes full PAE mode support starting with version 2.3.23,[17] enabling access of up to 64 GB of memory on 32-bit machines.”

On 64 bit windows, the WoW64 subsystem handles this. That includes thunking 32 bit addresses into 64 bit. The 32 bit app winds up using what looks like 32 bit addresses to it, but which may, in fact, be mapped into 64 bit addresses outside the 4 gb range.

ETA:

You may remember an earlier WoW or WoW32. That was a similar system to handle 16 bit apps on the 32 bit architectures. WoW64 has seemingly behaved a lot better.

That’s the system, though (as is the Wow64 comment below it). A given, single 32-bit application itself can’t see more than 4GB (no matter where that memory may lie), because it literally has no way to address it. PAE allows multiple different apps (well, processes, really) to use more of memory cumulatively (but not individually), and the WOW system stuff allows the 32-bit addresses of a single app to be scattered over 64-bit space, but neither of these make more than 32-bits worth of addressable memory available to a given 32-bit application.

Applications may use autonomous drivers, sub-processes, helper apps, etc. that have their own address spaces, and hence exceed the 4GB limit, but that’s really a case of “multiple programs” masquerading as one, and it’d be odd to do that deliberately, rather than just compiling an app as 64-bit (since you wouldn’t get the benefit of running on 32-bit machines if you use more memory than they have, anyway).