In Windows x86 your 32-bit application can only address 2GB of virtual address space. The other 2GB has been reserved for kernel operations. Under Windows x64, with the 32-bit application running under WoW64, you can give the access to the full 4GB virtual address space by changing a flag in the PE header. This is accomplished by using the EDITBIN.EXE utility which comes with Visual Studio.

editbin /LARGEADDRESSAWARE xxx.exe

Why not just simply compile and link xxx.exe as a native 64-bit application and get much more than 4GB? Well, the application may be using libraries and components which are only available as 32-bit binaries. In this case, building a 64-bit app is not an option. Also, if you have been following Rico Mariani’s (of Visual Studio fame) blog, you would know that there are some disadvantages of running native 64-bit applications vs. 32-bit applications under WoW64 – the main thing being that all address pointers would be twice the size, meaning a larger memory footprint and slower memory access.

You can use the DUMPBIN.EXE utility (also part of Visual Studio tools), to find out the setting of the /LARGEADDRESSAWARE flag in the header.

dumpbin /HEADERS xxx.exe

In the output of DUMPBIN look out for Application can handle large (>2GB) addresses. This means that your 32-bit app will be able to address the full 4GB address space when running under Windows x64. Note that when running the app in 32-bit Windows configured with the /3GB option, the app will be able to address 3GB.