Question

Is there any way to know whether the address is physical or virtual if address length of virtual is equal to physical,like 64-bit. For example, my mips processor is 64 bit and it is using 4GB of virtual memory.

Was it helpful?

Solution

If your CPU and OS provide a virtual memory system then every address your program deals with is going to be a virtual address. It is not going out map onto any specific physical memory location.

In such a system to gain access to a particular physical memory location you have to in effect write a device driver. Very few mainstream OSes allow unfettered access to physical memory to user space programs; that would completely break all of their security mechanisms!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top