Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists #114899

Merged
merged 14 commits into from
Feb 10, 2024
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
corona10 committed Feb 2, 2024
commit f4bdc2e18e4a4b9c89cc11ed89082ea04aa441d7
1 change: 1 addition & 0 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,7 @@
_PyDict_ClearFreeList(state, is_finalization);
_PyContext_ClearFreeList(state, is_finalization);
_PyAsyncGen_ClearFreeLists(state, is_finalization);
// Only be cleared if is_finalization is true.
_PyObjectStackChunk_ClearFreeList(state, is_finalization);
_PySlice_ClearCache(state, is_finalization);
}
Expand Down Expand Up @@ -1558,7 +1559,7 @@
#ifdef Py_GIL_DISABLED
// Each thread should clear own freelists in free-threading builds.
_PyFreeListState *freelist_state = &((_PyThreadStateImpl*)tstate)->freelist_state;
_Py_ClearFreeLists(freelist_state, 1);

Check warning on line 1562 in Python/pystate.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build and test (x64)

'_Py_ClearFreeLists' undefined; assuming extern returning int [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 1562 in Python/pystate.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build (arm64)

'_Py_ClearFreeLists' undefined; assuming extern returning int [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
#endif

_PyThreadState_ClearMimallocHeaps(tstate);
Expand Down
Loading