what are similarities and differences between dynamic loading and late binding?
-
From wikipedia: 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. In my opinion, 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.
-
Answer:
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.
tsubasa at Stack Overflow Visit the source
Other answers
As I understand it, dynamic loading is a lower level than late binding. So a late bound function call looks and feels just like an ordinary function call, except that if the library is missing then the application will terminate when the call is attempted instead of when the application launches, while for dynamic loading you have to write more code but you get to do error handling, such as calling a fallback method.
Neil
Related Q & A:
- What are the main differences between a Mobile and a PDA?Best solution by Yahoo! Answers
- What Are The Main Differences And Similarities Between Italy and Kenya?Best solution by uk.answers.yahoo.com
- What are some similarities and differences between the EU and globalization?Best solution by Yahoo! Answers
- What's the similarities and differences between the Australian Labor Party and the New Zealand Labour Party?Best solution by Yahoo! Answers
- What are similarities between France and the US?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.