Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
list uses freelist
  • Loading branch information
methane committed Oct 20, 2021
commit 4d6f7c33b604a4692a0f6e5f70810612be197abc
4 changes: 2 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ list_dealloc(PyListObject *op)
// list_dealloc() must not be called after _PyList_Fini()
assert(state->numfree != -1);
#endif
if (state->numfree < PyList_MAXFREELIST && PyList_CheckExact(op)) {
state->free_list[state->numfree++] = op;
if (PyList_CheckExact(op)) {
_PyObject_GC_Recycle(op, &PyList_Type);
}
else {
Py_TYPE(op)->tp_free((PyObject *)op);
Expand Down