C memory display

I know that there are two types of addresses. Virtual and physical. Printing the address of an integer variable will display its virtual address. Is there a function that makes it easier to print the physical memory of this variable?

Does the virtual memory have a partition on the hard drive that is processed by the operating system's RAM?

+3
source share
2 answers

No, there is no such (portable) function. In modern operating systems that implement memory protection, user space (unlike kernel space, that is, parts of the OS) cannot directly access physical addresses, which is simply not allowed. Therefore, it would make little sense.

, , "" "". , , , , "" .

, ​​Linux , .

+7

.

, , .

- , . , . , , / , , .

+2

All Articles