Do we still need BaseAddress in .vcproj files?

I just did this locally to all my .vcproj files for .pyds:
- BaseAddress="0x1e000000" + RandomizedBaseAddress="2"
This was partly out of curiosity, and partly because it was quicker doing that than finding a new unique base address to use for a new module I added to my local tree. Rebuilt everything and ran a full regression test, and everything passed. What am I missing? Do we have parts of Python that rely on finding modules at explicit base addresses? Is BaseAddress a relic from the past? Christian or Martin?
Trent.

Trent Nelson schrieb:
I just did this locally to all my .vcproj files for .pyds:
- BaseAddress="0x1e000000"
- RandomizedBaseAddress="2"
This was partly out of curiosity, and partly because it was quicker doing that than finding a new unique base address to use for a new module I added to my local tree. Rebuilt everything and ran a full regression test, and everything passed. What am I missing? Do we have parts of Python that rely on finding modules at explicit base addresses? Is BaseAddress a relic from the past? Christian or Martin?
An explicit base address speeds up the loading of shared extension modules a bit. Checkout PC/dllbase_nt.txt
Christian

This was partly out of curiosity, and partly because it was quicker doing that than finding a new unique base address to use for a new module I added to my local tree. Rebuilt everything and ran a full regression test, and everything passed. What am I missing? Do we have parts of Python that rely on finding modules at explicit base addresses? Is BaseAddress a relic from the past? Christian or Martin?
As Christian says: specifying the base address so that the addresses don't overlap avoids having Windows to perform relocations on startup.
There is a Microsoft tool (editbin /rebase) to compute non-overlapping base addresses for a given set of DLLs.
Regards, Martin

A while back I was reading an MSDN article that did some concrete research on the performance benefits of rebasing DLLs to avoid fixups at runtime, and it actually concluded that on modern systems, the benefits are really negligible. I tried finding the article on the net just now, though, and I couldn't, so don't take my word for it. This 1995 MSDN article provides an explanation and some raw numbers for systems at that time, though:
http://msdn2.microsoft.com/en-us/library/ms810432.aspx
- Atul
On Fri, Apr 25, 2008 at 2:00 PM, "Martin v. Löwis" martin@v.loewis.de wrote:
This was partly out of curiosity, and partly because it was quicker doing that than finding a new unique base address to use for a new module I added to my local tree. Rebuilt everything and ran a full regression test, and everything passed. What am I missing? Do we have parts of Python that rely on finding modules at explicit base addresses? Is BaseAddress a relic from the past? Christian or Martin?
As Christian says: specifying the base address so that the addresses don't overlap avoids having Windows to perform relocations on startup.
There is a Microsoft tool (editbin /rebase) to compute non-overlapping base addresses for a given set of DLLs.
Regards, Martin
Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/varmaa%40gmail.com
participants (4)
-
"Martin v. Löwis"
-
Atul Varma
-
Christian Heimes
-
Trent Nelson