Managed Code Article Index for
Managed
Website Links For
Managed
 

Information About

Managed Code




Managed code is code executed by a .NET virtual machine, such as Microsoft 's .NET Framework Common Language Runtime , The Mono Project , or DotGNU Project .

In a Microsoft Windows environment, all other code has come to be known as unmanaged code. In non- Windows and mixed environments, ''managed code'' is sometimes used more generally to refer to any Interpreted Programming Language .

''Managed'' refers to a method of exchanging information between the program and the Runtime environment. It is specified that at any point of execution, the runtime may stop an executing CPU and retrieve information specific to the current CPU Instruction address. Information that must be accessible generally pertains to runtime state, such as Processor Register or Stack memory contents.

The necessary information is then encoded in Common Intermediate Language (formerly known as Microsoft Intermediate Language ) and associated Metadata .

Before the code is run, the Intermediate Language is compiled into native Machine Code . Since this compilation happens by the managed execution environment's own runtime-aware Compiler , the managed execution environment can guarantee what the code is going to do. It can insert Garbage Collection hooks, Exception Handling , Type Safety , Array bounds, Index Checking , etc.

This is traditionally referred to as Just-in-time Compilation . However, unlike most traditional just in time compilers, the file that holds the pseudo Machine Code that the virtual machine compiles into native machine code can also contain pre-compiled binaries for different native machines (eg X86 and PowerPC ). This is similar in concept to the Apple Universal Binary format.


EXTERNAL LINKS