Re: upper limit on retain count
Re: upper limit on retain count
- Subject: Re: upper limit on retain count
- From: "Ivan S. Kourtev" <email@hidden>
- Date: Tue, 19 Apr 2005 14:30:30 -0400
Actually, 1e9 is approximately the same as 2^30 so at 1ns per retain
message it will take about 4-5 seconds to send 2^32 messages. Even at
a much lower retain-message frequency, it is not inconceivable that the
2^32 limit is exhausted within a reasonable time.
But thank you for all the replies, certainly illuminating and helped me
understand the mechanics of the issue. I did ask the original question
for two reasons. One, just because I was interested in the limitations
of the system (and it irritates me not to know these limitations). And
two, for practical reasons. I am working on -- and evaluating
alternatives for the use of Objective-C in -- CAD for ultra-large,
three-dimensional integrated circuits. It's not at all infeasible that
the low-level physical description of such artifacts contain 1e9
devices, each described by orders of magnitude of more objects. In
certain situations one cannot work on these things in a hierarchical
fashion and one needs to work on them "flat," so there can be "a lot"
of objects, each with "a lot" of connections to others, and each
flagged with a myriad of other objects. So to make this short,
I can think of situations where there will be a requirement to support
a retain count of more than 2^32. It's good that I now know understand
how to handle that. As far as the importance of understanding the
limits of the system, thinking about this reminded me of the explosion
of the Ariane 5 rocket 10 years ago because of overflow software error:
http://www.ima.umn.edu/~arnold/disasters/ariane.html
Cheers,
-- ivan
On Apr 19, 2005, at 12:19 PM, j o a r wrote:
On 2005-04-18, at 22.43, Ivan S. Kourtev wrote:
I wasn't able to find any documented upper limits on retain count on
32-bit machines (or in general). I am interested in knowing this
because I foresee a situation where I may have objects with retain
counts of hundreds of millions of billions and more.
"hundreds of millions of billions"? How much is that?
If "hundreds of millions of billions" is 1e17 and if a retain
operation take 1 ns to complete, it would take over three (3) years to
send all those retain messages...
(if I didn't make any mistakes with the calculator - it's been known
to happen...)
I humbly propose that:
a) Your design is wrong, or
b) Cocoa+ObjC is not the right set of tools to solve your problem, or
c) some sort of combination of the above.
j o a r
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden