[issue6695] PyXXX_ClearFreeList for dict, set, and list

Raymond Hettinger report at bugs.python.org
Sat Aug 15 07:37:50 CEST 2009


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Does anyone here know why GC calls the free_xxx functions?  ISTM, they
cannot be involved in cycles.  Free lists are kept by container objects
to speed-up allocation.  Having GC call the free_xxx just slows down the
GC process and all the subsequent set/list/tuple allocations until the
free lists are built-up again.  IMO, the free_xxx functions should only
be called during atexit or by an explicit call from the user perhaps,
sys.clear_freelists() or somesuch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6695>
_______________________________________


More information about the Python-bugs-list mailing list