473,406 Members | 2,713 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,406 software developers and data experts.

Practical limit on size of class

Fowllowing is the experpts of a C++ documents associated with Itanium ABI
Can some body explain what exctly this mean
"The offset of a non-virtual base subobject in the full object containing it
must be representable by a 56-bit signed integer (due to RTTI
implementation). This implies a practical limit of 2**55 bytes on the size
of a class.

Thanks
Vijay
Jul 19 '05 #1
4 3750
vijay <ge********@yahoo.com> wrote in message
news:bf**********@news.mch.sbs.de...
Fowllowing is the experpts of a C++ documents associated with Itanium ABI
Can some body explain what exctly this mean
"The offset of a non-virtual base subobject in the full object containing it must be representable by a 56-bit signed integer (due to RTTI
implementation). This implies a practical limit of 2**55 bytes on the size
of a class.


The document mixes up bits and bytes. Assuming it's bits, a 56-bit signed
integer is capable of representing a value +/- 2 to the power of 55. So the
size of an object can't be larger than that if the implementation needs to
keep its size in such an integer. This is no doubt a limit imposed by a
specific compiler on a given machine. Every compiler has to impose
reasonable limits for everything.

Were you thinking that 2**55 is too small?

DW

Jul 19 '05 #2
David White <no@email.provided> wrote in message
news:7L****************@nasal.pacific.net.au...
The document mixes up bits and bytes.


My mistake, since the size (of the object) will be in bytes.

DW

Jul 19 '05 #3
vijay wrote:
Following is the experts of a C++ documents associated with Itanium ABI
Can some body explain what exactly this means
"The offset of a non-virtual base subobject in the full object containing it
must be representable by a 56-bit signed integer
(due to RTTI implementation).
This implies a practical limit of 2**55 bytes on the size of a class.


What!
That's only about 36 quadrillion bytes!
Totally unacceptable.

Jul 19 '05 #4
vijay wrote:
Fowllowing is the experpts of a C++ documents associated with Itanium ABI
Can some body explain what exctly this mean
"The offset of a non-virtual base subobject in the full object containing it
must be representable by a 56-bit signed integer (due to RTTI
implementation). This implies a practical limit of 2**55 bytes on the size
of a class.
...


It means what it says. It means that in order to support some
RTTI-related functionality (like, for example, 'dynamic_cast' downcasts)
in multiple-inheritance object hierarchy the program needs to know and
be able to store offsets of base class subobjects of virtually any
object at run time. In the above implementation this information happens
to be stored in 56-bit signed integer field with +-2**55 value range.
Under this circumstances the implementation is forced to use 2**55 as
object size limit, since permitting base class subobjects larger than
2**55 bytes may easily result in offset values out of +-2**55 range.

--
Best regards,
Andrey Tarasevich
Brainbench C and C++ Programming MVP

Jul 19 '05 #5

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

Similar topics

8
by: Randell D. | last post by:
Folks, Sorry for the cross post into multiple newsgroups on this, but html forms processing is supported across all three groups so I was hoping someone might know. I did a check with Google...
88
by: Matt | last post by:
Hi folks. Can you help with some questions? I gather that some types supported by g++ are nonstandard but have been proposed as standards. Are the long long and unsigned long long types still...
2
by: steve | last post by:
I am setting up a huge database in mysql, and I get the above error in Linux. I believe it is related to the size of one of my tables, which is 4,294,966,772 bytes in size. Can someone help. How...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
10
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77...
9
by: James Macbell | last post by:
I think I have pushed ASP.NET to the limit, I am not sure if I have done anything wrong in the code because I am trying to make 2 pieces of code (C# vs PHP) using the same algorithm. Anyways, here...
5
by: Jefferis NoSpamme | last post by:
Hi all, I'm trying to limit the file size of an image submission and I keep running into various problems. I've got most of it working, but I'm stumped and I have a basic question as to WHY this...
1
by: HopfZ | last post by:
Internet Explorer 6 bookmarklets(favlets) has size limit. And its size limit depend on the kind of code. For example, CODE A and CODE B (below) are both at their size limit. CODE A does not work...
2
by: D. Susman | last post by:
Hi, I know that this issue is indeed strictly operating system dependent but I am just curious: I have a five dimensional array, whose size sums to 68 MB (almost). This array is contained by...
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?
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.