Click to See Complete Forum and Search --> : DLL relocation at application load time


Prashanth Patali
May 19th, 1999, 10:27 AM
Hi,
I maintain a CAD application. This has several DLLs(Aroung 25-30). When I debug the application in my 'output(debug) window', I get the following messages as these DLLs get loaded into the memory

Loaded 'MyDLLA.dll'
LDR: Automatic DLL Relocation in MyApp.exe
LDR: Dll MyAppB.dll base 10000000 relocated due to collision with MyDLLA.dll

This happens with all the dlls as they are loaded. Does this increase the loading time of my application?(now it takes quite a lot of time) and if it does, is there any way to avoid the above DLL relocation problem ?

thanks
prashanth

May 19th, 1999, 11:29 AM
In a nutshell...yes, rebasing the .DLLs DOES extend the load time, but only by a fraction of the associated I/O time. You can rebase the .DLLs using a utility bundled with MSVC 6.0, but past experience has shown that it is hardly worth the effort. First of all, rebasing a .DLL only gains a performance boost for the target application, others may actually experience a slow-down as the .DLL is rebased again. Secondly, rebasing has to be done for ALL .DLLs if one of them changes. You may do better looking at alternatives such as disk defragmenting, more memory for the file cache, and so on. I'm not convinced that you'll get the "bang for your buck" worrying about .DLL load addresses.

Cheers!
Humble Programmer
,,,^..^,,,

Ralf Herrmann
May 20th, 1999, 03:12 AM
You can also relocate a DLL through the address Project setting Link/Output/Base input.