Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > MMU and vtable

Reply
Thread Tools

MMU and vtable

 
 
schand
Guest
Posts: n/a
 
      10-26-2006
How does the virtual table accessed in MMU based system?

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      10-26-2006
schand wrote:
> How does the virtual table accessed in MMU based system?
>

The question is too implementation specific. Try a group dedicated to
your environment or you compiler documentation.

--
Ian Collins.
 
Reply With Quote
 
 
 
 
schand
Guest
Posts: n/a
 
      10-26-2006

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

> The question is too implementation specific. Try a group dedicated to
> your environment or you compiler documentation.
>
> --
> Ian Collins.


I checked the compiler manual I could not locate the virtual table
implementation. My ARM hardware has MMU enabled and the OS process/task
is running in separate memory area(with MMU support). There is no
shared memory support. So I want to know if two process access the
derived class (virtual pointer) objects and how the virtual table is
shared between these processes. As per my understaning vtable is
stored in the data segment.

 
Reply With Quote
 
Binary
Guest
Posts: n/a
 
      10-26-2006
what is your problem exactly? the data before your fork() will be
copied in both process.

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

> > The question is too implementation specific. Try a group dedicated to
> > your environment or you compiler documentation.
> >
> > --
> > Ian Collins.

>
> I checked the compiler manual I could not locate the virtual table
> implementation. My ARM hardware has MMU enabled and the OS process/task
> is running in separate memory area(with MMU support). There is no
> shared memory support. So I want to know if two process access the
> derived class (virtual pointer) objects and how the virtual table is
> shared between these processes. As per my understaning vtable is
> stored in the data segment.


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-26-2006
schand wrote:
> Ian Collins wrote:
>
>>schand wrote:
>>
>>>How does the virtual table accessed in MMU based system?
>>>

>>
>>The question is too implementation specific. Try a group dedicated to
>>your environment or you compiler documentation.
>>

>
> I checked the compiler manual I could not locate the virtual table
> implementation. My ARM hardware has MMU enabled and the OS process/task
> is running in separate memory area(with MMU support). There is no
> shared memory support. So I want to know if two process access the
> derived class (virtual pointer) objects and how the virtual table is
> shared between these processes. As per my understaning vtable is
> stored in the data segment.
>

Please set you newsreader to trim signatures.

I don't know of any operating environment where two process can share
objects that use virtual methods.

--
Ian Collins.
 
Reply With Quote
 
Bo Persson
Guest
Posts: n/a
 
      10-26-2006
schand wrote:
> Ian Collins wrote:
>> schand wrote:
>>> How does the virtual table accessed in MMU based system?
>>>

>> The question is too implementation specific. Try a group dedicated
>> to your environment or you compiler documentation.
>>
>> --
>> Ian Collins.

>
> I checked the compiler manual I could not locate the virtual table
> implementation. My ARM hardware has MMU enabled and the OS
> process/task is running in separate memory area(with MMU support).
> There is no shared memory support. So I want to know if two process
> access the derived class (virtual pointer) objects and how the
> virtual table is shared between these processes. As per my
> understaning vtable is stored in the data segment.


That is two entirely different uses of the word 'virtual'. They are
not connected in any way.

The MMU handles hardware virtuals, while the vtable is entirely a
software thing (and optional at that).



Bo Persson


 
Reply With Quote
 
schand
Guest
Posts: n/a
 
      10-26-2006
Yes, I know virtual memeory management.

Support we have clas sB derived from Class with virtual functions. If
I understand correctly, compiler will create a virtual table for class
B in the data area and Class B will have a pointer to vtable. Support
Process A and Process B create object of type Class B, ow the vtable is
shared.

Ian Collins wrote:
> schand wrote:
> > Ian Collins wrote:
> >
> >>schand wrote:
> >>
> >>>How does the virtual table accessed in MMU based system?
> >>>
> >>
> >>The question is too implementation specific. Try a group dedicated to
> >>your environment or you compiler documentation.
> >>

> >
> > I checked the compiler manual I could not locate the virtual table
> > implementation. My ARM hardware has MMU enabled and the OS process/task
> > is running in separate memory area(with MMU support). There is no
> > shared memory support. So I want to know if two process access the
> > derived class (virtual pointer) objects and how the virtual table is
> > shared between these processes. As per my understaning vtable is
> > stored in the data segment.
> >

> Please set you newsreader to trim signatures.
>
> I don't know of any operating environment where two process can share
> objects that use virtual methods.
>
> --
> Ian Collins.


 
Reply With Quote
 
schand
Guest
Posts: n/a
 
      10-26-2006

Yes, I know virtual memory management.

Support we have class B derived from Class A which has virtual
functions. If I understand correctly, compiler will create a virtual
table for class B in the data area and Class B will have a pointer to
vtable. Suppose Process A and Process B create object of type Class B,
how the vtable is shared.?
Bo Persson wrote:
> schand wrote:
> > Ian Collins wrote:
> >> schand wrote:
> >>> How does the virtual table accessed in MMU based system?
> >>>
> >> The question is too implementation specific. Try a group dedicated
> >> to your environment or you compiler documentation.
> >>
> >> --
> >> Ian Collins.

> >
> > I checked the compiler manual I could not locate the virtual table
> > implementation. My ARM hardware has MMU enabled and the OS
> > process/task is running in separate memory area(with MMU support).
> > There is no shared memory support. So I want to know if two process
> > access the derived class (virtual pointer) objects and how the
> > virtual table is shared between these processes. As per my
> > understaning vtable is stored in the data segment.

>
> That is two entirely different uses of the word 'virtual'. They are
> not connected in any way.
>
> The MMU handles hardware virtuals, while the vtable is entirely a
> software thing (and optional at that).
>
>
>
> Bo Persson


 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      10-27-2006
schand wrote:
>As per my understaning vtable is stored in the data segment.


Then what more do you want to know from the C++ newsgroup? How data
segment objects are loaded, and how their symbolic addresses are
resolved into run-time references, has absolutely nothing to do with
C++ and everything to do with the platform you are using.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-27-2006
schand wrote:

Top posting corrected, please don't!
>
> Ian Collins wrote:
>
>>schand wrote:
>>
>>>Ian Collins wrote:
>>>
>>>
>>>>schand wrote:
>>>>
>>>>
>>>>>How does the virtual table accessed in MMU based system?
>>>>>
>>>>
>>>>The question is too implementation specific. Try a group dedicated to
>>>>your environment or you compiler documentation.
>>>>
>>>
>>>I checked the compiler manual I could not locate the virtual table
>>>implementation. My ARM hardware has MMU enabled and the OS process/task
>>>is running in separate memory area(with MMU support). There is no
>>>shared memory support. So I want to know if two process access the
>>>derived class (virtual pointer) objects and how the virtual table is
>>>shared between these processes. As per my understaning vtable is
>>>stored in the data segment.
>>>

>>
>>Please set you newsreader to trim signatures.
>>
>>I don't know of any operating environment where two process can share
>>objects that use virtual methods.
>>

> Yes, I know virtual memeory management.
>
> Support we have clas sB derived from Class with virtual functions. If
> I understand correctly, compiler will create a virtual table for class
> B in the data area and Class B will have a pointer to vtable. Support
> Process A and Process B create object of type Class B, ow the vtable is
> shared.


Please set you newsreader to trim signatures.

No, it isn't, unless all your processes share the same address space.
As others have said, you appear to be confusing virtual memory for
virtual inheritance.

--
Ian Collins.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MMU and vtable schand C++ 1 10-27-2006 12:35 AM
virtual function and vtable kish_nand@yahoo.com C++ 9 02-09-2006 03:03 AM
vtable and such like GrahamJWalsh@gmail.com C++ 1 08-03-2005 02:23 PM
MMU-less systems and vfork. Brian Mitchell Ruby 6 05-05-2005 01:48 AM
HELP: wxValidator and undefined reference to `vtable ...` under linux Quansheng Liang C++ 2 05-25-2004 01:17 PM



Advertisments