It looks like your release build is also compiling as x86. If not, there should be something in your code that treats the pointer as signed 32-bit integers, and this code is only active in Release.
How is running from memory manifested?
In addition, it makes no sense to use the / 3gb flag for XP64 when working with 64-bit applications: it does not change anything in this scenario
source
share