Message91558
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() |
|
Date |
User |
Action |
Args |
2009-08-14 16:23:27 | matthiastroffaes | set | recipients:
+ matthiastroffaes, skip.montanaro |
2009-08-14 16:23:27 | matthiastroffaes | set | messageid: <1250267007.29.0.342938102881.issue6695@psf.upfronthosting.co.za> |
2009-08-14 16:23:26 | matthiastroffaes | link | issue6695 messages |
2009-08-14 16:23:25 | matthiastroffaes | create | |
|