According to many SO answers and this widely cited blog post, a .NET 4.5 application built for \'Any CPU\' with the \'prefer 32-bit\' option selected will run as a 32-bit pr
It turns out that, in Visual Studio 2015, building as 'AnyCPU (prefer 32-bit)' sets the IMAGE_FILE_LARGE_ADDRESS_AWARE bit on the executable (equivalent to running editbin /LARGEADDRESSAWARE
on it), whereas it does not for an x86 build. This can be confirmed with dumpbin /HEADERS
and looking for the line "Application can handle large (>2GB) addresses".
This is not the case for Visual Studio 2013. The change is apparently undocumented.
In theory, this should give the CLR an additional 2GB to play with. I don't know why the allocatable memory only goes up by about 300MB.