当前位置:网站首页>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 .
边栏推荐
- 触摸与屏幕自动旋转调试
- After 8 years of industry thinking, the test director has a deeper understanding of test thinking
- Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
- 栈,单调栈,队列,单调队列
- glassfish org. h2.server. Shutdownhandler classnotfoundexception exception exception handling
- UI自动化测试如何走出困境?价值又如何体现?
- Word line and bit line
- 如何清理v$rman_backup_job_details视图 报错ORA-02030
- QT: QSS custom qsplitter instance
- 封装一个koa分布式锁中间件来解决幂等或重复请求的问题
猜你喜欢
Stack, monotone stack, queue, monotone queue
[true question of the Blue Bridge Cup trials 44] scratch eliminate the skeleton Legion children programming explanation of the true question of the Blue Bridge Cup trials
Exclusive analysis | truth about resume and interview
. Net core - a queuing system for wechat official account
Software testing redis database
行业唯一!法大大电子合同上榜36氪硬核科技企业
10. Nacos source code construction
After 8 years of industry thinking, the test director has a deeper understanding of test thinking
Differences among norm, normalize and normalized in eigen
有赞CTO崔玉松:有赞Jarvis核心目标是使产品变得更加聪明和可靠
随机推荐
反正切熵(Arctangent entropy):2022.7月最新SCI论文
MAUI Developer Day in GCR
EPS电动转向系统分析
读书笔记:《心若菩提》 曹德旺
11. Provider service registration of Nacos service registration source code analysis
Qt:qss custom qgroupbox instance
12. Nacos server service registration of source code analysis of Nacos service registration
Programming examples of stm32f1 and stm32subeide -tm1637 drives 4-bit 7-segment nixie tubes
QT: QSS custom qtoolbar and qtoolbox instances
软件测试——Redis数据库
Basic theoretical knowledge of software testing -- app testing
可以写进简历的软件测试电商项目,不进来get一下?
软件测试(测试用例)编写之俗手、本手、妙手
T5 的尝试
Communication software development and Application
面试题总结(2) IO模型,集合,NIO 原理,缓存穿透,击穿雪崩
Software testing (test case) writing: vulgar, native and skillful
Google Earth Engine(GEE)——当我们前后影像来弥补插值效果得时候,没有效果怎么办?
《通信软件开发与应用》
年中了,准备了少量的自动化面试题,欢迎来自测