Operating Systems - (Native) Libraries
Table of Contents
1 - About
libary in an OS application are called native library.
There is two types of OS library:
- or Static
See shared vs static
2 - Articles Related
3 - Shared vs Static
3.1 - Memory Footprint
- Shared libraries can be used by any application software on the system without loading multiple copies into memory.
- Static libraries copy the code directly into the application therefore growing every application by the size of all the libraries they use.
In most modern Unix-like systems, including Linux, programs are by default compiled to use shared library (so, dll)
3.2 - Code versioning
- Shared libraries have no built-in mechanism for backward compatibility. Minor changes may cause the application to crash.
- Static libraries avoid this problem because the version that was used to build the application is included inside it, so even if a newer version exists elsewhere on the system, this does not affect the application.