httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Costello <>
Subject Re: DLL Base addresses (was: .dsp link options)
Date Thu, 01 Jan 1970 00:00:00 GMT
On Tue, 18 Apr 2000, Greg Stein wrote:
> Euh... those conflicts are only for within an particular .exe address
> space. Apache DLLs are not going to conflict with Office97 -- they never
> get loaded into an Office process.

Agreed. The LISTDLLS tool from SysInternals ( provides
useful output. So the question remains, why 0x27800000? 

> > I'll toss together a simple .dll scanner that pulls nothing but the
> > reloc base/length from all the dll's on a machine a reports the used
> > and available pages (they must be on 64k boundries last time I checked).
> Extra work. Not needed.

It's probably still a good idea to rebase though - especially because we have two processes
running (with the current WinNT MPM). From the Platform SDK (

"It is best to base DLLs from the top of the address range down, instead of from the bottom
up. Dynamic memory is allocated from the bottom up and if a DLL tries to load where dynamic
memory has been allocated, it will be relocated, just as if a DLL was loaded at that address.


"...[on NT/x86] the system DLLs are currently based in memory from 0x70000000 to 0x78000000..."

Benefits of rebasing are given in

I get a bad feeling from the fact that base addresses in all the project files are now hard-coded,
because it seems like either quite a maintenance effort or the sort of thing that will be
overlooked in time. I've been using the following patch for a little while to rebase all Apache
DLLs after compilation using EDITBIN - it calculates new addresses automatically given a ceiling
address, currently set to 0x70000000. 


===== START PATCH =====

diff -r -N -u /srclib/repos/apache/2.0/src/src/ src/
--- /srclib/repos/apache/2.0/src/src/	Thu Apr 06 08:25:05 2000
+++ src/	Mon Apr 17 10:09:50 2000
@@ -16,6 +16,8 @@
 # Note: this does *NOT* change the compiled in default "server root"
 !IF "$(INSTDIR)" == ""
 !MESSAGE Using default install directory \Apache
@@ -87,6 +89,26 @@
 #       cd modules\proxy
 #        nmake /nologo CFG="ApacheModuleProxy - Win32 $(LONG)" -f ApacheModuleProxy.mak
 #       cd ..\..
+# Rebase DLLs
+!IF "$(LONG)" == "Release"
+!MESSAGE Rebasing DLLs from $(TOP_DLL_LOCATION) down.
+        Core$(SHORT)\ApacheCore.dll lib\apr\$(LONG)\aprlib.dll \
+        os\win32\ApacheModuleStatus$(SHORT)\ApacheModuleStatus.dll \
+#        os\win32\ApacheModuleInfo$(SHORT)\ApacheModuleInfo.dll \
+        os\win32\ApacheModuleAuthAnon$(SHORT)\ApacheModuleAuthAnon.dll \
+        os\win32\ApacheModuleDigest$(SHORT)\ApacheModuleDigest.dll \
+        os\win32\ApacheModuleCERNMeta$(SHORT)\ApacheModuleCERNMeta.dll \
+        os\win32\ApacheModuleExpires$(SHORT)\ApacheModuleExpires.dll \
+        os\win32\ApacheModuleHeaders$(SHORT)\ApacheModuleHeaders.dll \
+        os\win32\ApacheModuleRewrite$(SHORT)\ApacheModuleRewrite.dll \
+        os\win32\ApacheModuleSpeling$(SHORT)\ApacheModuleSpeling.dll \
+        os\win32\ApacheModuleUserTrack$(SHORT)\ApacheModuleUserTrack.dll \
+#        modules\proxy\$(LONG)\ApacheModuleProxy.dll
+        > NUL
 	-mkdir $(INSTDIR)

===== END PATCH =====
This message was sent through MyMail

View raw message