All Topics  
Managed code

 

   Email Print
   Bookmark   Link






 

Managed code



 
 
Managed code is computer program code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
 that executes under the management of a virtual machine
Virtual machine

In computer science, a virtual machine is a software implementation of a machine that executes programs like a real machine.Definitions...
, unlike unmanaged code, which is executed directly by the computer's CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
. The benefits of managed code include programmer convenience and enhanced security guarantees. The specific term managed code is particularly pervasive in the Microsoft world. Microsoft's most common languages for creating managed code are C#, Visual Basic.NET and C++/CLI
C++/CLI

C++/CLI is Microsoft's language specification intended to supersede Managed Extensions for C++. Completely revised to simplify the older Managed C++ syntax , it provides much more clarity and code readability than Managed C++....
.

Programs in any programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 could, in principle, be compiled into either managed or unmanaged code.






Discussion
Ask a question about 'Managed code'
Start a new discussion about 'Managed code'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Managed code is computer program code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
 that executes under the management of a virtual machine
Virtual machine

In computer science, a virtual machine is a software implementation of a machine that executes programs like a real machine.Definitions...
, unlike unmanaged code, which is executed directly by the computer's CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
. The benefits of managed code include programmer convenience and enhanced security guarantees. The specific term managed code is particularly pervasive in the Microsoft world. Microsoft's most common languages for creating managed code are C#, Visual Basic.NET and C++/CLI
C++/CLI

C++/CLI is Microsoft's language specification intended to supersede Managed Extensions for C++. Completely revised to simplify the older Managed C++ syntax , it provides much more clarity and code readability than Managed C++....
.

Programs in any programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 could, in principle, be compiled into either managed or unmanaged code. In practice, however, each programming language is typically compiled into one type. For example, the Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
 programming language is almost always compiled into managed code, although there are Java compilers that can generate unmanaged code (such as GNU Compiler for Java
GNU Compiler for Java

The GNU Compiler for Java , a free software compiler for the Java , forms part of the GNU Compiler Collection.GCJ can compile Java source code to either Java Virtual Machine bytecode, or directly to machine code for any of a number of CPU architectures....
).

There are many historical examples of managed code running on a virtual machine, such as UCSD Pascal
UCSD Pascal

UCSD Pascal or UCSD p-System was a portable, highly machine-independent operating system. The University of California, San Diego Institute for Information Systems developed it in 1978 to provide students with a common operating system that could run on any of the then available microcomputers as well as campus Digital Equipment Corpora...
 utilizing p-code
P-Code machine

In computer programming, a p-code machine or pseudo-code machine is a virtual machine designed to execute p-code . This term is applied both generically to all such machines , and to specific implementations, the most famous being the p-Machine of UCSD Pascal....
. Java popularized this approach with its Bytecode
Bytecode

Bytecode is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software Interpreter as well as being suitable for further compilation into machine language....
 executed by the Java Virtual Machine
Java Virtual Machine

A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
. Microsoft uses managed code in its CLR virtual machine
Common Language Runtime

The Common Language Runtime is a core component of Microsoft .NET Framework initiative. It is Microsoft's implementation of the Common Language Infrastructure standard, which defines an execution environment for program code....
 in the .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
, or another similar virtual machine
Virtual machine

In computer science, a virtual machine is a software implementation of a machine that executes programs like a real machine.Definitions...
.

Some compilers produce intermediate "pseudocode
Pseudocode

Pseudocode is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but is intended for human reading rather than machine reading....
" with intention of compiling it further into target machine code
Machine code

Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit. Machine code may be regarded as a primitive programming language or as the lowest-level representation of a compiled and/or assembly language computer program....
, not running it within a virtual machine as managed code (see, for example, BCPL
BCPL

BCPL is a computer programming language designed by Martin Richards of the University of Cambridge in 1966....
 or ALGOL 68C
ALGOL 68C

The ALGOL68C computer programming language compiler was developed for the CHAOS OS for the CAP capability computer at University of Cambridge in 1971 by Stephen Bourne and Mike Guy as a dialect of ALGOL 68....
).

External links