Author pablogsal
Recipients carljm, corona10, dino.viehland, eelizondo, gregory.p.smith, nascheme, pablogsal, pitrou, shihai1991, steve.dower, tim.peters, vstinner
Date 2020-04-14.18:39:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586889554.46.0.45690575916.issue40255@roundup.psfhosted.org>
In-reply-to
Content
> I'm not sure what you mean here by "balanced ref count" or by "work" :) What will happen anytime an immortal object gets into the GC, for any reason, is that the GC will "subtract" cyclic references and see that the immortal object still has a large refcount even after that adjustment, and so it will keep the immortal object and any cycle it is part of alive. This behavior is correct and should be fully expected; nothing breaks. It doesn't matter at all to the GC that this large refcount is "fictional," and it doesn't break the GC algorithm, it results only in the desired behavior of maintaining immortality of immortal objects.


Yep, that is right. I think there was a race condition between my previous message and yours :)

I think what was confusing me in this line of reasoning is that I was not taking into account that the immortal bit is a very high one, making the refcount gigantic. I was treating it mentally like a flag without factoring the implications of such big reference count.
History
Date User Action Args
2020-04-14 18:39:14pablogsalsetrecipients: + pablogsal, tim.peters, nascheme, gregory.p.smith, pitrou, vstinner, carljm, dino.viehland, steve.dower, corona10, eelizondo, shihai1991
2020-04-14 18:39:14pablogsalsetmessageid: <1586889554.46.0.45690575916.issue40255@roundup.psfhosted.org>
2020-04-14 18:39:14pablogsallinkissue40255 messages
2020-04-14 18:39:14pablogsalcreate