[issue45522] Allow to build Python without freelists
Christian Heimes
report at bugs.python.org
Tue Oct 19 07:06:04 EDT 2021
New submission from Christian Heimes <lists at cheimes.de>:
Freelists are an optimization trick to avoid allocation and deallocation of commonly used structures. Currently Python has freelists for frame, tuple, float, list, dict, async generators, and context objects. Small ints are also cached.
For experimentation with alternative memory allocators such as mimalloc, I would like to introduce a way to disable freelists. Tuples's _Py_tuple_state struct has a conditional check on #if PyTuple_MAXSAVESIZE > 0. I propose to add same logic to all other structs.
----------
assignee: christian.heimes
components: C API
messages: 404289
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Allow to build Python without freelists
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45522>
_______________________________________
More information about the Python-bugs-list
mailing list