• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

DLLs and Memory

I am curious as to how DLLs work in memory most specifically whether the whole DLL is loaded into memory when a single function is called (or class instantiated).

I am mostly interested in terms of COM objects.

Basically can someone tell me what the performance/memory differences are in calling a class in a DLL that contains many other classes as opposed to calling a dll that has a single class?

0
JustinB
Asked:
JustinB
  • 2
1 Solution
 
makerpCommented:
yes, when you use a dll even if only one function is used then the whole dll is loaded. if this is the case for you you may be better linking staticaly to the dll (only possible if you have a .lib that is a static equavilent)

dlls should only be used if more than one program can use what they have otherwise it aint worth it. obviosly the more classes in a dll the bigger the dll, the more memory it will use and the longer it will take to load
0
 
JustinBAuthor Commented:
Thats what I thought, thanks.
0
 
makerpCommented:
glad to be of help
0

Featured Post

KuppingerCole Reviews AlgoSec in Executive Report

Leading analyst firm, KuppingerCole reviews AlgoSec's Security Policy Management Solution, and the security challenges faced by companies today in their Executive View report.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now