Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
Update Python/pystate.c
Co-authored-by: Sam Gross <[email protected]>
  • Loading branch information
kevmo314 and colesbury authored Dec 1, 2025
commit 795e703759b4928edd7dc87a161fe5e3ad35d6e9
4 changes: 2 additions & 2 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,8 +1814,8 @@ tstate_delete_common(PyThreadState *tstate, int release_gil)
// Flush the thread's local GC allocation count to the global count
// before the thread state is deleted, otherwise the count is lost.
_Py_atomic_add_int(&tstate->interp->gc.young.count,
(int)((_PyThreadStateImpl *)tstate)->gc.alloc_count);
((_PyThreadStateImpl *)tstate)->gc.alloc_count = 0;
(int)tstate_impl->gc.alloc_count);
tstate_impl->gc.alloc_count = 0;
#endif

#if _Py_TIER2
Expand Down
Loading