convert virtual address to physical address

K

Krishna Sagiraju

hai,

can we convert virtual address to physical address using c/c++ ?

thanx

Krishna
 
J

jacob navia

In general you do not have any access to physical memory under modern
OSes (linux/windows)

You can access physical memory only through a device driver.
 
M

Mark McIntyre

hai,

can we convert virtual address to physical address using c/c++ ?

This is not a C question, its an OS question. Even if it were possible,
then any function to do so would be OS specific and therefore not part of
Standard C.
You'll need to ask in a group specialising in your hardware.
 
M

Malcolm

Krishna Sagiraju said:
can we convert virtual address to physical address using c/c++ ?
The whole point of virtual addresses is that C and C++ programs can't mess
with them to get to the underlying physical memory.
However your compiler may ship with a library that provides translation
functions, and it will certainly provide an inline assembler, so if user
programs are allowed to do the translation at all it should be possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top