gh-128954: Reorder _PyInterpreterFrame fields for reduced memory usage (#128958)

This reduces the size of _PyInterpreterFrame by 8 bytes on 64-bit
platforms using the free threading build due to alignment requirements.

This allows for slightly more recursive calls into the interpreter (from
C), but `test_call.test_super_deep` still crashes.
This commit is contained in:
Sam Gross 2025-01-27 12:14:51 -05:00 committed by GitHub
parent 8a5a18a36e
commit a6a8c6f86e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -1621,7 +1621,7 @@ class SizeofTest(unittest.TestCase):
return sys._getframe()
x = func()
if support.Py_GIL_DISABLED:
INTERPRETER_FRAME = '10PhcP'
INTERPRETER_FRAME = '9PihcP'
else:
INTERPRETER_FRAME = '9PhcP'
check(x, size('3PiccPP' + INTERPRETER_FRAME + 'P'))