Misplaced Pages

Runtime library: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 03:31, 23 May 2014 editDsimic (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers39,664 edits top: We shouldn't have explicit formatting such as that← Previous edit Revision as of 19:21, 24 May 2014 edit undoFrançois Robere (talk | contribs)Extended confirmed users18,758 editsm Undid revision 609758590 by Dsimic (talk) In general I agree, but there's an issue here with the different templates where there's no whitespace at all between themNext edit →
Line 1: Line 1:
{{Mergewith|Runtime system|date=April 2014}} {{Mergewith|Runtime system|date=April 2014}}
{{Refimprove|date=December 2013}} {{Refimprove|date=December 2013}}
{{-}}
{{Program execution}} {{Program execution}}

In ], a '''runtime library''' is a set of low-level routines used by a ] to invoke some of the behaviors of a ], by inserting calls to the runtime library into compiled executable binary. The runtime environment implements the execution model, built-in functions, and other fundamental behaviors of a ]. During execution (]) of that ], execution of those calls to the runtime library cause communication between the executable binary and the runtime environment. A runtime library often includes built-in functions for memory management, or for ].<ref name="gcc-runtime">{{cite web In ], a '''runtime library''' is a set of low-level routines used by a ] to invoke some of the behaviors of a ], by inserting calls to the runtime library into compiled executable binary. The runtime environment implements the execution model, built-in functions, and other fundamental behaviors of a ]. During execution (]) of that ], execution of those calls to the runtime library cause communication between the executable binary and the runtime environment. A runtime library often includes built-in functions for memory management, or for ].<ref name="gcc-runtime">{{cite web
| url = http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html | url = http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html

Revision as of 19:21, 24 May 2014

It has been suggested that this article be merged with Runtime system. (Discuss) Proposed since April 2014.
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Runtime library" – news · newspapers · books · scholar · JSTOR (December 2013) (Learn how and when to remove this message)
Program execution
General concepts
Types of code
Compilation strategies
Notable runtimes
Notable compilers & toolchains

In computer programming, a runtime library is a set of low-level routines used by a compiler to invoke some of the behaviors of a runtime environment, by inserting calls to the runtime library into compiled executable binary. The runtime environment implements the execution model, built-in functions, and other fundamental behaviors of a programming language. During execution (run time) of that computer program, execution of those calls to the runtime library cause communication between the executable binary and the runtime environment. A runtime library often includes built-in functions for memory management, or for exceptions handling. Therefore, a runtime library is always specific to the platform and compiler.

The runtime library may implement a portion of the runtime environment's behavior, but if one reads the code of the calls available, they are typically only thin wrappers that simply package information, and send it to the runtime environment or operating system. However, sometimes the term runtime library is meant to include the code of the runtime environment itself, even though much of that code cannot be directly reached via a library call.

For example, some language features that can be performed only (or are more efficient or accurate) at runtime are implemented in the runtime environment and may be invoked via the runtime library API, e.g. some logic errors, array bounds checking, dynamic type checking, exception handling, and possibly debugging functionality. For this reason, some programming bugs are not discovered until the program is tested in a "live" environment with real data, despite sophisticated compile-time checking and testing performed during development.

As another example, a runtime library may contain code of built-in low-level operations too complicated for their inlining during compilation, such as implementations of arithmetic operations not directly supported by the targeted CPU, or various miscellaneous compiler-specific operations and directives.

The concept of a runtime library should not be confused with an ordinary program library like that created by an application programmer or delivered by a third party, nor with a dynamic library, meaning a program library linked at run time. For example, the C programming language requires only a minimal runtime library (commonly called crt0), but defines a large standard library (called C standard library) that has to be provided by each implementation.

References

  1. ^ "The GCC low-level runtime library". GCC Introduction. gnu.org. Retrieved 2013-12-30.
  2. "Other Built-in Functions Provided by GCC". GCC Introduction. gnu.org. Retrieved 2013-12-30.
  3. "The C Runtime Initialization, crt0.o". embecosm.com. 2010. Retrieved 2013-12-30.

External links


Stub icon

This computer-library-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: