当前位置:网站首页>Static library vs shared library
Static library vs shared library
2022-07-03 11:11:00 【MrPeng1991】
- Static library
Before the shared library appeared , Public functions exist in the form of static libraries , Package multiple object files of the general function module , The program that uses it only needs to specify this library file when linking , The linker will extract the functional code used from this library and copy it to the target program , There is no need to recompile these general function codes every time .
Static library embodies a good idea of modularization , But with the development of computer industry , The static library gradually exposes two serious problems
- Large disk and memory space . Although the static library accelerates the compilation speed , It improves the efficiency of collaboration between different departments , But in the program linked by each static library , Will save a copy of the referenced general function code , And at runtime , Each copy will occupy the corresponding physical memory .
- Upgrading the version of the library is very troublesome , Once the public library is modified , Every program that references him needs to be relinked with the new version of the Library . In a scenario where libraries and applications are maintained by different companies or organizations , The upgrade work has become extremely complex , If there is bug Repair , All applications using this library need to be upgraded separately
- Shared library
To solve these two problems , Shared library technology came into being .
First , Applications that use shared libraries when compiling links , Do not copy the functions in the library to the target file , Only one reference is recorded in the target file , Mark the library function referred to , Until the program runs Only dynamic connector can locate the position of function code , Therefore, the volume of the generated executable program is significantly reduced .
secondly , Each shared library has only one copy in physical memory , Multiple applications will map the same executable file in their virtual address space , Therefore, it can save objective memory space .
This working mode of shared library greatly facilitates the upgrading of the Library , When the shared library releases a new version , Users only need to upgrade this shared library , All applications that use this library can automatically get the features in the new library or bug Repair , Instead of upgrading each application separately .
边栏推荐
- php服务器 与redis交互大量CLOSE_WAIT分析
- Qt:qss custom QSlider instance
- After 8 years of industry thinking, the test director has a deeper understanding of test thinking
- 行业唯一!法大大电子合同上榜36氪硬核科技企业
- 嵌入式软件测试怎么实现自动化测试?
- Qt:qss custom qspinbox instance
- 大厂技术专家:工程师如何提升沟通能力?
- Typescript learning summary
- Lecture 1 number field
- The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
猜你喜欢

封装一个koa分布式锁中间件来解决幂等或重复请求的问题

UI自动化测试如何走出困境?价值又如何体现?

Solve the problem that pycharm Chinese input method does not follow

测试理论概述

《通信软件开发与应用》

"Core values of testing" and "super complete learning guide for 0 basic software testing" summarized by test engineers for 8 years

【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯

ByteDance layoffs, test engineers were almost destroyed: how terrible is the routine behind the recruitment of large factories?

【obs】obs的ini格式的ConfigFile

EPS电动转向系统分析
随机推荐
Qt:qss custom qgroupbox instance
反正切熵(Arctangent entropy):2022.7月最新SCI论文
封装一个koa分布式锁中间件来解决幂等或重复请求的问题
Latest sales volume of pinduoduo
图解网络:什么是虚拟路由器冗余协议 VRRP?
Qt:qss custom qspinbox instance
面试题总结(2) IO模型,集合,NIO 原理,缓存穿透,击穿雪崩
触摸与屏幕自动旋转调试
Software testing (test case) writing: vulgar, native and skillful
软件测试(测试用例)编写之俗手、本手、妙手
线性表的双链表
栈,单调栈,队列,单调队列
Exclusive analysis | truth about resume and interview
浅析-JMM内存模型
项目管理精华读书笔记(七)
ExecutorException: Statement returned more than one row, where no more than one was expected.
The highest monthly salary of 18K has a good "mentality and choice", and success is poor "seriousness and persistence"~
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
After 8 years of industry thinking, the test director has a deeper understanding of test thinking
Tencent micro app to get wechat user information