views:

166

answers:

1

We need to link one of our executables with this flag as it uses lots of memory. But why give one EXE file special treatment. Why not standardize on /LARGEADDRESSAWARE? So the question is: Is there wrong with using /LARGEADDRESSAWARE even if you don't need it. Why not use it as standard for all EXE files?

+4  A: 

Because lots of legacy code is written with the expectation that "negative" pointers are invalid. Anything in the top two Gb of a 32bit process has the msb set.

As such, its far easier for Microsoft to play it safe, and require applications that (a) need the full 4Gb and (b) have been developed and tested in a large memory scenario, to simply set the flag.

Its not - as you have noticed - that hard.

Raymond Chen - in his blog The Old New Thing - covers the issues with turning it on for all (32bit) applications.

Chris Becke
+1 from me for that interesting blog by Raymond Chen...
tommieb75