什么是动态加载和后期绑定之间的异同? [英] what are similarities and differences between dynamic loading and late binding?

查看:87
本文介绍了什么是动态加载和后期绑定之间的异同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

维基百科:

动态加载是一种机制,使一个计算机程序,可以在运行时,加载库(或其他二进制)到内存中,检索库中包含的函数和变量的地址,执行这些功能或访问这些变量,并从内存中卸载该库。

Dynamic loading is a mechanism by which a computer program can, at run time, load a library (or other binary) into memory, retrieve the addresses of functions and variables contained in the library, execute those functions or access those variables, and unload the library from memory.

后期绑定在计算机编程机制中,该方法的某物体被称为是在运行时抬头的名字。

Late binding is a computer programming mechanism in which the method being called upon an object is looked up by name at run-time.

在我看来,

一个相似之处是它们在哪些方法在运行时抬头两种机​​制。

A similarity is they are both mechanisms in which methods are looked up at run-time.

一个区别是动态加载不需要在运行时加载库但后期绑定总是需要接头后使用接头。

A difference is dynamic loading does not need to use a linker after loading the library at run-time but late binding always need a linker.

我不知道我是否正确,尤其是差异的一部分。我想了解您的分析了。

I'm not sure if I am correct, especially the difference part. I would like to learn more from your analysis.

推荐答案

后期绑定,就像过量,是挤出的正确性,并有可能出现灾难性的失败为代价的一些额外的好处(性能/内存津贴)黑客攻击。

Late binding, much like overcommit, is a hack to squeeze out some extra benefit (performance / memory allowance) at the expense of correctness and possible late catastrophic failure.

不含模块的后期绑定,动态加载才会成功,如果需要搬迁所有的符号可以在加载时解决,你从中可以恢复,如果他们不能得到解决一个有意义的错误。随着后期绑定,动态加载实际上总是成功,则可以在动态加载模块试图引用无法解析的符号之后你的程序崩溃。

Without late binding, dynamic loading of modules will succeed only if all symbols needed for relocation can be resolved at load time, and you get a meaningful error from which you can recover if they can't be resolved. With late binding, dynamic loading virtually always "succeeds", then can crash your program later when the dynamic loaded module tries to reference a symbol that can't be resolved.

这篇关于什么是动态加载和后期绑定之间的异同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆