473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MMU and vtable

How does the virtual table accessed in MMU based system?

Oct 26 '06 #1
9 2288
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.
Oct 26 '06 #2

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.

Oct 26 '06 #3
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.
Oct 26 '06 #4
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.
Oct 26 '06 #5
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
Oct 26 '06 #6
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.
Oct 26 '06 #7

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
Oct 26 '06 #8
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.

Oct 27 '06 #9
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.
Oct 27 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Quansheng Liang | last post by:
Hello, I struggled with the problem of "undefined reference to `vtable ...`" while migrating a project from windows to linux. After searching the google I removed all the inline functions and now...
6
by: Nolan Martin | last post by:
Hello, I was wondering if it were possible to access the vtable directly. Are there any resources that detail the inner workings of the vtable?
3
by: bp | last post by:
Hi, Could someone to tell me what I'm doing wrong? I'm using gcc version 3.3.4 and ld version 2.15.90.0.3 20040415 the linker message is: .../obj/classOpenAreaForm.o(.text+0x211): In...
7
by: Karl Ebener | last post by:
Hi! I have created a program using several classes with inheritage. When I compile and link, I get the following error: :$ g++ service2.cpp Service.cpp Application.cpp Message.cpp...
4
by: Clint Ruen | last post by:
Hello all, I have written out a data structure using the binary flag on an ofstream. The struct/class is something like this class SomeData { public: int data1;
4
by: rahul8143 | last post by:
hello, what happens to VTABLE when base class has virtual function and derived class does not override it? Does derived class also builds VTABLE if it has no functions? eg. if code is like...
9
by: kish_nand | last post by:
Could someone please explain me the concept behind virtual functions and vtables. I am little confused about this. Please refer to the following code and tell me how many virtual tables would be...
17
by: ypjofficial | last post by:
Hello All, I have read in many c++ literature that vtable is nothing but an array of pointer to virtual functions inside a class.And the class where the virtual function/s are declared stores the...
5
by: druberego | last post by:
I read google and tried to find the solution myself. YES I do know that you can get undefined references if you: a) forget to implement the code for a prototype/header file item, or b) you forget...
10
by: Ole Nielsby | last post by:
James Kanze <james.kanze@gmail.comwrote: COM does rely on vtable layout. COM interfaces are declared as pure virtual classes, all methods using stdcall convention, and this works because most...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.