This maps to the /baseaddress compiler switch. See http://msdn2.microsoft.com/en-us/library/b1awdekb(VS.90).aspxfor more about that.
1. Managed code still is packaged in dlls and still needs to occupy some spot in memory.
2. The OS can indeed shuffle where dlls get loaded if there are collisions. But each DLL gets to request a "default" base address. If you have a group of dlls, you can choose their defaults such that they load together without having collisions. Having to load a module at something other than the default base address is extra work (it requires touching up relocations). This option is an optimization for advanced scenarios.
You can read more about DLL rebasing here: http://blogs.msdn.com/larryosterman/archive/2004/07/06/174516.aspx or by searching around for terms like module, rebase, fixup, reloc. |