MMU and vtable

Discussion in 'C++' started by schand, Oct 26, 2006.

  1. schand

    schand Guest

    How does the virtual table accessed in MMU based system?
     
    schand, Oct 26, 2006
    #1
    1. Advertising

  2. schand

    Kaz Kylheku Guest

    schand wrote:
    > How does the virtual table accessed in MMU based system?


    Virtual tables, a common C++ implementation artifact, have nothing to
    do with virtual memory.

    They are just named static objects deposited into your object files and
    linked into your program along with everything else.

    On a virtual memory OS that assigns a separate address space to each
    process, it's possible for vtables in an executable to have the same
    fixed address every time they are loaded. So they can be accessed by a
    direct address. In a dynamic library which can be loaded anywhere in
    the address space, they have to be accessed with some indirection: a
    "global offset table", like any other function or object.
     
    Kaz Kylheku, Oct 27, 2006
    #2
    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. Quansheng Liang
    Replies:
    2
    Views:
    572
    Quansheng Liang
    May 25, 2004
  2. Replies:
    1
    Views:
    296
    Victor Bazarov
    Aug 3, 2005
  3. Replies:
    9
    Views:
    454
    Scott J. McCaughrin
    Feb 9, 2006
  4. schand

    MMU and vtable

    schand, Oct 26, 2006, in forum: C++
    Replies:
    9
    Views:
    465
    Ian Collins
    Oct 27, 2006
  5. Brian Mitchell

    MMU-less systems and vfork.

    Brian Mitchell, May 2, 2005, in forum: Ruby
    Replies:
    6
    Views:
    225
    Brian Mitchell
    May 5, 2005
Loading...

Share This Page