How do you read directly from physical memory?

前端 未结 7 916
灰色年华
灰色年华 2020-11-30 02:01

In C or C++ (windows), how do you read RAM by giving a physical (not virtual) address? That means without going trough virtual memory system (mmu tables), and being specific

7条回答
  •  伪装坚强ぢ
    2020-11-30 02:25

    Short Answer: No

    Long Answer:

    The C/C++ standard define a machine in very simple terms. There is no concept of virtual memory (just memory). These concepts are more the domain of the hardware and may be potentially accessed via the OS (if it is aware OS such things).

    I would re-ask the question in terms of the facilities provided by your OS/Hardware.

提交回复
热议问题