468,554 Members | 1,393 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

convert virtual address to physical address

hai,

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

thanx

Krishna
Nov 14 '05 #1
3 8853
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.
Nov 14 '05 #2
On Sat, 10 Jul 2004 16:20:08 GMT, in comp.lang.c , Krishna Sagiraju
<sa******@gmail.com> wrote:
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.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #3

"Krishna Sagiraju" <sa******@gmail.com> wrote

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.
Nov 14 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by sushant | last post: by
8 posts views Thread by And | last post: by
16 posts views Thread by B Letts | last post: by
3 posts views Thread by Dhruba Bandopadhyay | last post: by
14 posts views Thread by Lorenzo | last post: by
1 post views Thread by =?Utf-8?B?QiBTaW5naA==?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.