As I understand it the original concept of a DLL was that no matter how many concurrent programs were using it, there only needed to be one copy of it loaded in memory. This gave advantages in both program load speed, efficient use of physical memory and thus faster operation due to less page faults.
There now seem to be appearing numerous Micrsoft articles that the DLL concept has been a failure and that they would rather revert to the Unix concept that a program is a complete EXE with no DLL's except system calls.
The early indications of this were that Visual Studio 6 now by default places user DLL's in the same directory as the program. This implies, as windows looks for the DLL in the program directory first, that a new copy of the DLL is loaded into memory for each program that is using it.
It seems that there are two main problems, the first is DLL version incompatabilty, for which they have even written a program called DLLHELL, which should not be a problem for careful PBDLL writers, however it does raise the question of is there any way to include the version number of a PBDLL such that it will appear on the properties page for a DLL (would be nice to be able to show copyright info too).
The main problem appears to be that upon loading, the EXE expects to find the DLL at a specific memory location (or the DLL expects to load at a specific memory location) in the programs virtual memory space and finds that another DLL is already there. This causes the loader to have to do significant work relocating the second loaded DLL and load a copy which is no longer shared with other programs.
If I write programs that use more than one PBDLL DLL is there any way for me to specify the load address of each DLL such that this conflict does not occur? Is the default location of a PBDLL out of the range normally used by Microsoft?
As each running program is given its own 4 Gig flat address space there appears to be ample room for the programmer of a suite of programs to minimise this address conflict.
Also is there any way in PBDLL to use ordinal addressing rather than name addressing for exported subs and functions (yes I know the version problems but it is much faster)?
There now seem to be appearing numerous Micrsoft articles that the DLL concept has been a failure and that they would rather revert to the Unix concept that a program is a complete EXE with no DLL's except system calls.
The early indications of this were that Visual Studio 6 now by default places user DLL's in the same directory as the program. This implies, as windows looks for the DLL in the program directory first, that a new copy of the DLL is loaded into memory for each program that is using it.
It seems that there are two main problems, the first is DLL version incompatabilty, for which they have even written a program called DLLHELL, which should not be a problem for careful PBDLL writers, however it does raise the question of is there any way to include the version number of a PBDLL such that it will appear on the properties page for a DLL (would be nice to be able to show copyright info too).
The main problem appears to be that upon loading, the EXE expects to find the DLL at a specific memory location (or the DLL expects to load at a specific memory location) in the programs virtual memory space and finds that another DLL is already there. This causes the loader to have to do significant work relocating the second loaded DLL and load a copy which is no longer shared with other programs.
If I write programs that use more than one PBDLL DLL is there any way for me to specify the load address of each DLL such that this conflict does not occur? Is the default location of a PBDLL out of the range normally used by Microsoft?
As each running program is given its own 4 Gig flat address space there appears to be ample room for the programmer of a suite of programs to minimise this address conflict.
Also is there any way in PBDLL to use ordinal addressing rather than name addressing for exported subs and functions (yes I know the version problems but it is much faster)?
Comment