]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing...
authorT. Wouters <thomas@python.org>
Tue, 24 Mar 2026 01:27:57 +0000 (02:27 +0100)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2026 01:27:57 +0000 (02:27 +0100)
commit684e7af8cd61bca4914d0ec01b814ff530d5a123
treebe9fdfe4f4caf2e37f5e897ab20c24fe5a5fdbfa
parent0d82ce82f15f3761704cd77fc9412b61a41f78ae
[3.13] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) (#146123)

* gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) (#145828)

Cache one datachunk per tstate to prevent alloc/dealloc thrashing when repeatedly hitting the same call depth at exactly the wrong boundary.

Move new _ts member to the end to not mess up remote debuggers' ideas of the
struct's layout. (The struct is only created by the runtime, and the new
field only used by the runtime, so it should be safe.)

(cherry picked from commit 706fd4ec08acbf1b1def3630017ebe55d224adfa)
(cherry picked from commit 19cbcc0f85f30954293dbd92d718d5b81880b092)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Doc/data/python3.13.abi
Include/cpython/pystate.h
Misc/NEWS.d/next/Core_and_Builtins/2026-03-11-00-13-59.gh-issue-142183.2iVhJH.rst [new file with mode: 0644]
Python/pystate.c