My Tech notes: Dynamic linking and static linking
Subscribe

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Tuesday, June 3, 2008

Dynamic linking and static linking

*   A dynamicllay linked executable is smaller than its statically
counterpart. It saves disk and virtual memory, as libraries
are only mapped in to the process when needed.

* All executables dynamically linked to a particular library share
a single copy of the library at runtime. The kernel ensures that
libraries mapped into memory are shared by all processes using
them. This provides better I/O and swap space utilization and
in sparing of physical memory, improving overall system throughput.

* Dynamic linking permits easy versioning of libraries. New libraries
can be shipped; once installed on the system, old programs
automatically get the benefit of the new version without needing
to be relinked.

* Finally (much less common), dynamically linking allows users to
select at runtime which library to execute against. It's possible
to create library versions that are tuned for speed, or for
memory efficiency, or that contains extra debugging information,
and allow the user to express a preference when execution takes
place by substituting one library file for another.

No comments:

Post a Comment