Common Language Runtime

From Wikipedia, the free encyclopedia
Jump to: navigation, search
The CLR converts CIL to native code.

The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as Just-in-time compilation, the compiled code is converted into machine instructions that, in turn, are executed by the computer's CPU. The CLR provides additional services including memory management, type safety and exception handling. All programs written for the .NET framework, regardless of programming language, are executed by the CLR. It provides exception handling, garbage collection and thread management. CLR is common to all versions of the .NET framework.

The CLR is Microsoft's implementation of the Common Language Infrastructure (CLI) standard.

See also [edit]

Components of CLR The following are the components of CLR :-

Class Loader: This loads classes into the runtime.

MSIL to native code compiler: This converts MSIL code into native code.

Code manager: This manages the code during execution i.e provides code check, the resources it needs during execution.

Garbage Collector: provide automatic memory management and avoid memory leaks.

Security Engine: This enforces security restrictions and CAS.

Type Checker: This enforces strict type checking.

Thread Support: This provides multithreading support to applications.

Exception Manager : This provides a mechanism to handle the run-time exceptions.

Debug Engine : Allow you to debug different type of applications.

COM marshaler : This allows .net application to exchange data with COM applications.

BASE Class library : This provides the types the applications needed at runtime.

External links [edit]