Solved

DLLs and Memory

Posted on 2002-05-22
3
231 Views
Last Modified: 2010-04-15
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
Comment
Question by:JustinB
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 50 total points
ID: 7041703
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
 
LVL 1

Author Comment

by:JustinB
ID: 7041794
Thats what I thought, thanks.
0
 
LVL 10

Expert Comment

by:makerp
ID: 7041813
glad to be of help
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

770 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