Well if is program is a 32 bit executable, here's your problem. Even if your running on a 64 bits OS, you just can't allocate more than 2 gb of memory. Even with the LARGE ADDRESS AWARE thing, i think you'll be limited to 3gb instead. If you need that much memory, why not compile a 64 bits exec??
yes.
personally though, I am sticking with 32 bits for now, mostly until 32-bit OS's pretty much die off, since a 64-bit program will not work on a 32-bit computer.
I had at one point been building mostly for 64-bits, but this issue of "being friendly to 32-bit WinXP" brought things back.
memory use is still a challenge though, as 2-3GB doesn't go as far sometimes as one might think, and fragmentation can be an issue, especially if one tries to do lots of exact-size arrays.
one trick I have often used is that most variable-size structures (arrays/etc), are not sized exactly, but rather follow a curve like 4*1.5n, or 16*1.5n, such that while there is often a little waste, fragmentation is reduced (when an array is reallocated, it is padded up to the next size in the curve).
this is sometimes combined with a bit of trickery, like some amount of keeping stuff compressed in RAM and decompressing things on demand, ...
interestingly, this turns out to not really be a new thing (it was fairly common back in the 16-bit era).