[Python-Dev] Evil reference cycles caused Exception.__traceback__
francismb at email.de
Mon Sep 25 13:51:29 EDT 2017
just curious on this,
On 09/18/2017 10:54 PM, Antoine Pitrou wrote:
>> I'm not an expert on GC at all, but intuitively it sure seems like
>> allocation size might be a useful piece of information to feed into a
>> heuristic. Our current heuristic is just, run a small collection after
>> every 700 allocations, run a larger collection after 10 smaller
> Ok, so there are two useful things a heuristic may try to guess:
> 1. how much CPU time a (full) collection will cost
> 2. how much memory it might help release
> While #1 is quite realistically predictable (because a full collection
> is basically O(number of allocated objects)), #2 is entirely
> unpredictable and you can really only make out an upper bound
> (trivially, the GC cannot release any more memory than has been
> allocated :-)).
is the allocation size not useful enough for #2 ?
(the upper bound seems logical as far as the location is done by
the same "entity", (or size communicated back to) )
Thanks in advance!
More information about the Python-Dev