Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DLL/DPL: How to choose imagebase?

Posted on 2001-07-20
3
Medium Priority
?
829 Views
Last Modified: 2008-02-01
It's about the imagebase linker param that defaults to $00400000.

For DLL's and DPL's I understand it's recommended to change it, in order to minimize load time and eventually memory consumption.

1. First of all, has anybody any experience about the efectiveness of changing this setting?
2. Can you suggest any policy for choosing the value?
3. Any potential problems when several apps are using the same DLL because it was loaded at its preferred address?
4. How do you manage the settings for different DLL's across all your pool of own-developed libraries? What about "collision" chances with other libraries already in the target system?

Thank you,
F.
0
Comment
Question by:fva
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 400 total points
ID: 6303276
Hi F.

1.) Unless the app uses a large number of dll's, this has little affect, and then only on the load time.

2.) Per MSDN:

The system DLLs are currently based in memory from 0x70000000 to 0x78000000 (0x68000000 to 0x78000000 on MIPS). Therefore, you should base your DLLs from 0x60000000 to 0x68000000. One possible scheme is to choose a base address based on the first letter of the DLL name.

First letter Base address
A - C 0x60000000
D - F 0x61000000
G - I 0x62000000
J - L 0x63000000
M - O 0x64000000
P - R 0x65000000
S - U 0x66000000
V - X 0x67000000
Y - Z 0x68000000

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.

3.) No.

4.) Not sure if I follow the question, but windows will rebase the dll in memory if the image base address is in conflict. Answer 2 (above) covers the addresses for system dll's.

Russell



0
 
LVL 4

Author Comment

by:fva
ID: 6308172
Hi, thanks.

I admit, 4) it's actually a rephrase of 2)

I'll let some time open this, maybe I get other opinions, too.

F.
0
 
LVL 4

Author Comment

by:fva
ID: 6326229
And here are your points since nobody else cared to add any comment.

Thanks,
F.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question