convert virtual address to physical address

Discussion in 'C Programming' started by Krishna Sagiraju, Jul 10, 2004.

  1. hai,

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

    thanx

    Krishna
     
    Krishna Sagiraju, Jul 10, 2004
    #1
    1. Advertising

  2. Krishna Sagiraju

    jacob navia Guest

    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.
     
    jacob navia, Jul 10, 2004
    #2
    1. Advertising

  3. On Sat, 10 Jul 2004 16:20:08 GMT, in comp.lang.c , Krishna Sagiraju
    <> 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 =---
     
    Mark McIntyre, Jul 10, 2004
    #3
  4. Krishna Sagiraju

    Malcolm Guest

    "Krishna Sagiraju" <> 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.
     
    Malcolm, Jul 10, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SJ

    MAC Address/Physical Address?

    SJ, Jan 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    560
  2. sushant

    virtual address or physical address?

    sushant, Feb 18, 2005, in forum: C Programming
    Replies:
    9
    Views:
    1,037
    CBFalconer
    Feb 18, 2005
  3. =?Utf-8?B?SmVmZiBCZWVt?=

    physical path to virtual path under virtual directory

    =?Utf-8?B?SmVmZiBCZWVt?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,093
    Eliyahu Goldin
    Aug 1, 2007
  4. marss
    Replies:
    5
    Views:
    1,024
    marss
    Sep 13, 2007
  5. Scott Tilton

    Convert Physical path to Virtual path?

    Scott Tilton, Jul 11, 2003, in forum: ASP General
    Replies:
    2
    Views:
    640
    Dhananjay Modak
    Jul 11, 2003
Loading...

Share This Page