This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author matthiastroffaes
Recipients matthiastroffaes, skip.montanaro
Date 2009-08-14.16:23:24
SpamBayes Score 3.6630872e-09
Marked as misclassified No
Message-id <1250267007.29.0.342938102881.issue6695@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the feedback!

Attaching a new patch which implements tp_free_list slot as suggested -
I hope I did it correctly. I've only implemented the new slot for dict
so far, but I'm happy to tp_free_list-ify the other freelist types as
well, in a future patch, if this gets the green light.

Description of the patch:

* added tp_free_list slot to PyTypeObject (definitely for review: is the
location of tp_free_list right after tp_free sensible?)
* added PyType_ClearFreeList(PyTypeObject *) to C API, which calls the
tp_free_list function if not NULL
* inserted the new slot where necessary (e.g. in PyGen_Type) to sync
type definitions with the updated PyTypeObject
* created dict_free_list function and added it to PyDict_Type
* call PyType_ClearFreeList(&PyDict_Type) from gc.collect()
History
Date User Action Args
2009-08-14 16:23:27matthiastroffaessetrecipients: + matthiastroffaes, skip.montanaro
2009-08-14 16:23:27matthiastroffaessetmessageid: <1250267007.29.0.342938102881.issue6695@psf.upfronthosting.co.za>
2009-08-14 16:23:26matthiastroffaeslinkissue6695 messages
2009-08-14 16:23:25matthiastroffaescreate