Tuesday, January 27, 2009

DLL Memory Management

I have been a good Visual Basic Programmer during my early days in undergraduate course. VB6 is used extensively to develop desktop (windows) based applications. DLLs here mean Dynamic Link Libraries. DLLs generally store function definitions. So, when called by an application by passing input parameters, it executes function stored in.


So, what is the benefit of DLLS? A normal programmer would say that it helps in modularization (i.e. it helps to separate business logics). Yes, that is absolutely true. I also remember developing DLLs for printing, reporting and handling common functions. That is not enough. I have noticed that applications using DLLs are more efficient that those not using it. They consume less time and memory. May be windows itself helps in memory management of applications using DLLs.


One major benefit of DLL becomes that the running application (EXE) can be less in size. It is because most of its functionalities are stored in DLLs. And DLLs can be called upon requirement basis and similarly freed after use. Thus, it helps to reduce memory consumption by the Application EXE.