]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 18 Mar 2026 15:47:36 +0000 (16:47 +0100)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2026 15:47:36 +0000 (16:47 +0100)
commit19cbcc0f85f30954293dbd92d718d5b81880b092
treede09ab319df344980a92b1abdb84fba231cd4e72
parent6980b94c3a25a69278ef9b348fabec7831651e8e
[3.14] 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)
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Doc/data/python3.14.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