Unmanaged code?

  • Thread starter Thread starter Jarod_24
  • Start date Start date
I'm sure there are better explainations but here's mine in a nutushell.

Managed code is what the CLR ( Common Langauge Runtime ) manages. It Manages
the secuirty of your code, the allocation of memory, the JIT of Intermediate
Langauge, the type saftey etc.

Unamaged code is code which runs natively on your machine.

Regards - OHM
 
* "Jarod_24 said:
What is 'Unmanaged Code', and what is 'Managed Code'?

Everything which is written by using the .NET Framework /only/ (no
p/invoke, no COM interop) is "managed code". Everything else is
unmanaged code.
 
Only if its unmanaged. .NET code is MSIL which is an intermediate langauge.
A 'real' executable executes machine code. Unless we are talking about C++
generated unmanaged code.

OHM
 
One Handed Man said:
Only if its unmanaged. .NET code is MSIL which is an intermediate
langauge. A 'real' executable executes machine code. Unless we are
talking about C++ generated unmanaged code.


After JIT compilation it *is* machine code.
 
erm, YES, but thats is not available in the executable is it. The
executable is not machine code. CLR loads the JIT'd code into memory after
it checked the security permissions and creates a process for it to run in.

Regards - OHM
 
One Handed Man said:
erm, YES, but thats is not available in the executable is it. The
executable is not machine code. CLR loads the JIT'd code into memory
after it checked the security permissions and creates a process for
it to run in.


I forgot the ";-)"
 
* "One Handed Man said:
Only if its unmanaged. .NET code is MSIL which is an intermediate langauge.
A 'real' executable executes machine code. Unless we are talking about C++
generated unmanaged code.

Nevertheless, the JITter will create native code which is executed on
the machine. You can use "ngen.exe" to create a native image of an
application. IMO native code doesn't have much to do with
managed/unmanaged.
 
* "One Handed Man said:
erm, YES, but thats is not available in the executable is it. The
executable is not machine code. CLR loads the JIT'd code into memory after
it checked the security permissions and creates a process for it to run in.

Yes, basically you are right. But .NET application images can contain
native code too.
 
Back
Top