Author ncoghlan
Recipients Trundle, ncoghlan, pitrou, tim.peters
Date 2011-11-13.01:06:26
SpamBayes Score 1.15035e-07
Marked as misclassified No
Message-id <1321146387.5.0.535843344881.issue13390@psf.upfronthosting.co.za>
In-reply-to
Content
I added some review comments to the patch, but I'm not sure how usable this is going to be in practice. References generally stay fairly stable while using the interactive interpreter, but the new block accounting jumps around all over the place due to the internal free lists (which *don't* count in for 'gettotalrefcounts', but *do* count in the new block accounting). The following interpreter session has both this patch and the #13389 patch applied:

>>> a = sys.getallocedblocks()
[76652 refs, 21773 blocks]
>>> a
21779
[76652 refs, 21774 blocks]
>>> x = [None]*10000
[76652 refs, 21776 blocks]
>>> del x
[66650 refs, 21775 blocks]
>>> gc.collect(); gc.collect(); gc.collect()
0
0
0
[66650 refs, 21756 blocks]
>>> b = sys.getallocedblocks()
[66652 refs, 21772 blocks]
>>> b - a
-2
[66652 refs, 21772 blocks]

So, generally +1 on the idea, but I think we should hide at least the initial implementation behind PY_REF_DEBUG until we're sure we've worked the kinks out of it.
History
Date User Action Args
2011-11-13 01:06:27ncoghlansetrecipients: + ncoghlan, tim.peters, pitrou, Trundle
2011-11-13 01:06:27ncoghlansetmessageid: <1321146387.5.0.535843344881.issue13390@psf.upfronthosting.co.za>
2011-11-13 01:06:26ncoghlanlinkissue13390 messages
2011-11-13 01:06:26ncoghlancreate