Hi…the default base address for the dll is 0x10000000. Which is the default for ALL new dll projects. If another dll is already loaded at that address, windows will have to relocate the dll. This takes loading time…
As far as I know there’s no downside to changing the base address….just faster loading….
I would appreciate it when the next version is on another base address…
- Bartje asked 15 years ago
I can’t see why having the default base address at a different location would help any, I belive windows moving the dll to another memory location would only take a matter of nanoseconds or milliseconds which on the scale of things isn’t enough of a saving to be bothered with.
This is from MSDN:
The base address of a DLL is the location in virtual memory where the loader attempts to place the DLL. It is generally specified at link time. If a DLL cannot load at its base address because the memory is already occupied, the loader places the DLL elsewhere in virtual memory, then updates all calls into the DLL to reflect the new base address. Making these changes can be time consuming, because the image must be copied to the pagefile and modified for the new address. If you have a large application that uses many DLLs, it is important for each DLL to have a different base address to minimize load time.
And I read about it in some other places…hey…and every nanosecond counts right
I don’t really agree on this. I’m not saying it takes seconds to load, but since I’m writing a ActiveX for HTML pages loading time is a serious issue. And in the documentation it clearly states that it will load it into the swap-file…this means (in most cases) disk access…and as you know any disk access will take at least about 9ms of seek time…this will prob. be needed a few times..let’s say 5…and 100Kb/(2000Kb/s) = 50ms of data transfer time…twice = 100ms….which adds up to 150ms…of course this is a worst case senario….but when developing an ActiveX for the public, this might happen on quite some systems…..and 150ms is a hell of a lot to me…. I haven’t done exact timings on it yet, but changing the base address of my 1Mb core DLL seemed to save quite some loading time… and I couldn’t find any reason not to change it… well, so far my input on this subject…use it as you please
The FMOD DLL is only 112KB or so. Moving this around will be a lot less work than a 1MB core DLL. Besides, what’s to say that any other address that Brett decides to use, if he does, won’t be occupied already? You can only really set the base addresses of DLLs that you create yourself and have full control over. Third-party libraries such as FMOD must be generic in order to suit the majority.
just rebase the dll yourself. MS shipps a tool w/ VC and the platformsdk, "rebase.exe".
rebase -b 0x11000000 fmod.dll
or code your own tool, apis which are usefull:
MapAndLoad/ImageLoad, ReBaseImage, etc…
i think you got the idea:)
Please login first to submit.