Understand runtime system

Source: Internet
Author: User

Recently, libraries on different platforms need to be compiled. Therefore, more attention is paid to the underlying layer than only C ++ programs were previously developed. Let's take a look at the explanation of the term runtime system.

References:

Http://en.wikipedia.org/wiki/Runtime_system

The runtime system is sometimes called "RunTime", but the literal meaning of "RunTime" is what happens during running and has a wide range. So here I still use runtime system.

No matter what computer language, certain policies will be executed at runtime, more or less. These policies are obviously some code that can run, and these code will certainly appear in your executable program. The code that implements these policies is called the runtime system. therefore, this is something that is made by humans. It can do very little, such as C, or a lot, such as Java or other advanced dynamic languages. Some languages may define a standard. What should the runtime system do? Maybe the implementers of different compilers decide what to do with the runtime system. After all, it is a piece of code written by a person.

Let's take a look at what C's runtime-system can do. It manages the stack of processes, creates space for local variables, pushes call parameters to the function stack, and maintains the stack status.

In the object-oriented language, runtime-system can also perform type checks and resolving method references, as well as memory pool management, such as Java's runtime system.


If this part of the code is placed in a dynamic or static library, it is called the Runtime Library. For example, in VC:

Http://msdn.microsoft.com/en-us/library/ms235265.aspx


Finally, do not equate the C ++ standard library with the Runtime Library. The former provides all the implementations of the C ++ standard library, such as the libstdc ++ of GCC, and the latter is the runtime system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.