[issue23601] use small object allocator for dict key storage

Marc-Andre Lemburg report at bugs.python.org
Sat Mar 7 14:43:18 CET 2015


Marc-Andre Lemburg added the comment:

There seem to be quite a few other places where this simple optimization could make sense as well, perhaps even going as far
as converting all uses of PyMem_MALLOC to PyObject_MALLOC.

There was a time when the small memory allocator did not return
free arenas to the system allocator, but those are long ago.

The only detail to watch out for is not mixing the malloc/free APIs. In particular, memory which is allocated in the interpreter and then deallocated elsewhere in extensions needs to continue using the PyMem_* APIs.

----------

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


More information about the Python-bugs-list mailing list