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

where is VTABLE stored ?

Hello,

Needed some clarification about VTABLE.
Where is the physical location of VTABLE ?.
Is it stored in Code segment or in Data segment.?

May 10 '06 #1
4 3780

"shijo" <sh**********@in.bosch.com> schrieb im Newsbeitrag
news:e3**********@ns2.fe.internet.bosch.com...
Hello,

Needed some clarification about VTABLE.
Where is the physical location of VTABLE ?.
Is it stored in Code segment or in Data segment.?


There might be _no_ vtable at all. It's compiler specific.
May 10 '06 #2
Gernot Frisch wrote:
"shijo" <sh**********@in.bosch.com> schrieb im Newsbeitrag
news:e3**********@ns2.fe.internet.bosch.com...
Hello,

Needed some clarification about VTABLE.
Where is the physical location of VTABLE ?.
Is it stored in Code segment or in Data segment.?


There might be _no_ vtable at all. It's compiler specific.


Right. You should not care about the details of the mechanism used for
implementing virtual functions, but if you do for some reason, you'll
need to ask in group related to your compiler.

Cheers! --M

May 10 '06 #3
shijo schrieb:
Hello,

Needed some clarification about VTABLE.
Where is the physical location of VTABLE ?.
Somewhere in memory, i guess :-)
Is it stored in Code segment or in Data segment.?


The language C++ has no "code segment" or "data segment", but if you
think about it, what does the names "code segment" and "data segment"
suggests?
Well, its up to the compiler.

Th.
May 10 '06 #4
shijo wrote:
Hello,

Needed some clarification about VTABLE.
Why? It's an implementation detail that is usually of not interest to the
programmer.
Where is the physical location of VTABLE ?. Is it stored in Code segment
or in Data segment.?

That (if there actually is a vtable at all, and a separation of code and
data) depends on the compiler.
May 10 '06 #5

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

Similar topics

54
by: sks_cpp | last post by:
What is a type_info function, more particularly, what is a type_info node? Are these related to the vtable by any means? I have seen linker errors such as: "undefined reference to SomeClass...
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...
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...
9
by: thomson | last post by:
Hi all, Would you please explain me where will be the heap stored if it is declared inside the Class, As class is a reference type, so it gets stored on the heap, but struct is a value...
9
by: schand | last post by:
How does the virtual table accessed in MMU based system?
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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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...
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
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,...

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.