zoukankan      html  css  js  c++  java
  • [原]c++ vs c++cli (part0)

    items :
    CLR : commond language runtime 
    CIL : comman intermediat langauge
    MSIL: microsoft intermediat langauge
    JIT : just in time 
    VES :Virtual Execution System
     before we go on with c++ & c++\cli we just  take  simple breath here with native code,virtual machine and managed code 

    Managed code

    Native code

     the code that executes under the management of a virtual machine

     

     the code xecuted directly by the computer's CPU

     include programmer convenience and enhanced security guarantees

     Some complex with low level security guarantees

     

     


    The Virtual Machine
    C++/CLI applications execute in the context of the CLR. The CLR implements a virtual machine,
    which is a software implementation of an idealized, abstract execution environment. Programs
    that run on the CLR virtual machine use a language known as the Common Intermediate
    Language (CIL). Microsoft’s implementation of CIL is often referred to as MSIL, or just plain IL.
    The CLR relies on a JIT (just-in-time) compiler to translate the CIL code on demand into machine
    code in order to execute the program.
    The CLR virtual machine is Microsoft’s implementation of the Virtual Execution System
    (VES), which is part of the ECMA standard. As processors change, you need only change the
    way in which the executable code is generated from the processor-independent layer, and
    you’ll still be able to run the old programs written for the earlier processor. Pure IL generated
    by compilers targeting the CLR does not contain x86 instructions or any other object code that
    is configured to run on a particular processor. Compilers output MSIL code that can run on the
    virtual machine.

    Native

    Managed

    Pointer / Handle

    *

    ^

    Reference

    &

    %

    Allocate

    new

    gcnew

    Free

    Delete

    Delete(Optional)

    it will done auto by Garbage collector 

    Use Native Heap

    ü

    ü( Value types only)

    Use Managed Heap

    û

    ü

    Use Stack

    ü

    ü

    Verifiability

    * and & never

    ^ and % always


    c++ is native code , C++CLI is managed code 
    that what i want to tell You!!
  • 相关阅读:
    解读《TCP/IP详解》(卷1):05章:RARP(逆地址解析协议)
    Android中利用“反射”动态加载R文件中的资源
    “骆驼”怎么写
    eclipse无法访问genymotion模拟器下/data/data文件解决方案
    解读《TCP/IP详解》(卷1):03章:IP(网际协议)
    解读《TCP/IP详解》(卷1):02章:链路层
    hdu1039 java正则表达式解法
    hdu1027 又是next_permutaiton
    hdu1261 java水过高精度排列组合。。
    hdu1716 STL next_permutation函数的使用
  • 原文地址:https://www.cnblogs.com/ammar/p/1528454.html
Copyright © 2011-2022 走看看