Re: Does project load DLL multiple times?

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Gabriel Magaña" <no-spam@xxxxxxxxxxx> wrote in message
news:OspLYSTKGHA.648@xxxxxxxxxxxxxxxxxxxxxxx
|> As for the framework itself, the CLR is loaded into the process space
| > of EACH process it is in. If you have multiple app domains that are
| > running in the same process, then the CLR is loaded once for the
process.
| > However, if you have two apps in two separate processes, then the CLR is
| > loaded twice.
|
| Can you put thi in terms of RAM :-)? I think we are talking about the sme
| idea but maybe stating the same thing in different terms. If two separate
| processes use the same DLL, then the DLL executable code is _not_ loaded
| twice into RAM, the already-loaded executable code only exists in RAM
once,
| the code page is just re-mapped from the one instance in memory. Am I
right
| so far?
|
| Now the data page, the memory area that contains the memory that the DLL
is
| modifying, _does_ get duplicated for each app domain...
|
| In other words, given an executable code of a DLL that is 500K and the
data
| memory used by the DLL is 64K: If three app domains use the DLL/class
| library, 500K + 64K + 64K + 64K of memory will be used. Is this correct?
|
|

You must make a clear destiction between managed DLL's (assemblies) and
unmanaged DLL's.
Managed code DLL's (pure MSIL) are loaded per AD. the SMI and X86 code
(after JIT compiling) and data aren't shared amongst processes, nor are
they shared amongst AD's unless the assembly is loaded domain neutral.
The framework classes (a lot of them in v2) are pre-jitted native images,
that means that their code segments are shared amongst processes and
possible between AD's.
The CLR (written in native code) is only loaded once per proces and the code
segments are shared amongst (.NET) processes.

Willy.





.



Relevant Pages

  • Re: calling DLL
    ... When I create a .NET 2003 forms app and declare the dll ... without the CLR. ... >> 2003 that had a simple MyProg console app project that was trying to ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Options to force the version of .Net Frameworks used by a dll
    ... The reason for this is that I have a Managed C++ app dll built using ... correct version of the .Net Frameworks and 'works'. ... is it possible that the 2.0 CLR is already loaded into the ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Firefox and Sound
    ... number of loads that app performed. ... only references to entry points in the dll. ... specified entry points in it can't be found, ... but the download manager said it was only 78.8 MB. ...
    (comp.os.os2.apps)
  • Re: New Delphi roadmap is coming: NO UNICODE PLEASE!
    ... Avoids DLL hell, because it ... The app is deployed and the user is getting an error. ... instances where upgrading .NET broke things that were working. ... Coming from Delphi, this isn't any big deal of course. ...
    (borland.public.delphi.non-technical)
  • Re: What programming language for Future
    ... usually when apps come with scripts, those scripts are for that version ... version of the app. ... Which is exactly the same as when the compiler is shipped with the app. ... for the sole reason that they can't rebuild a working dll. ...
    (comp.lang.misc)