473,379 Members | 1,167 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,379 software developers and data experts.

MMU and vtable

How does the virtual table accessed in MMU based system?

Oct 26 '06 #1
9 2287
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.