cppcon2020 Back to basics: The Abstract Machine

文章目录
  1. 1. 什么是 C++ Abstract Machine
  2. 2. Structure
    1. 2.1. Memory
    2. 2.2. Objects
  3. 3. Threads
  4. 4. Summary
  • 参考资料
  • 什么是 C++ Abstract Machine

    “The C++ Abstract machine is a portable abstraction of your operating system, kernel and hardware. The abstract machine is the intermediary between your c++ program and the system that it is run on.”

    C++ defines how programs work in terms of an abstract machine deliberately defined to be “close to the hardware”.

    When we write c++ code, we are writing to the c++ abstract machine.

    Structure

    Memory

    Objects

    Threads

    Memory

    • A single flat space.

    • No memory hierarchy

      • No concept of statck, registers or cache
      • No concept of heterogeneous memory
    • All parts of memory are equally reachable by the am
    • Access to memory hash uniform latency

    Objects

    Threads

    Summary

    参考资料