https://github.com/python/cpython/commit/6545f244b83f5bff49dd05f6712f287798858c1a
commit: 6545f244b83f5bff49dd05f6712f287798858c1a
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-12-16T11:54:44Z
summary:

[3.14] gh-119786: Remove mention of `_PyThreadState_BumpFramePointer` from 
`InternalDocs/interpreter.md` (GH-141816) (#142812)

Co-authored-by: Mikhail Efimov <[email protected]>
Co-authored-by: Irit Katriel <[email protected]>

files:
M InternalDocs/interpreter.md

diff --git a/InternalDocs/interpreter.md b/InternalDocs/interpreter.md
index 38e9f6fced6088..75acdf596a7f30 100644
--- a/InternalDocs/interpreter.md
+++ b/InternalDocs/interpreter.md
@@ -226,10 +226,11 @@ Up through 3.10, the call stack was implemented as a 
singly-linked list of
 heap allocation for the stack frame.
 
 Since 3.11, frames are no longer fully-fledged objects. Instead, a leaner 
internal
-`_PyInterpreterFrame` structure is used, which is allocated using a custom 
allocator
-function (`_PyThreadState_BumpFramePointer()`), which allocates and 
initializes a
-frame structure. Usually a frame allocation is just a pointer bump, which 
improves
-memory locality.
+`_PyInterpreterFrame` structure is used. Most frames are allocated 
contiguously in a
+per-thread stack (see `_PyThreadState_PushFrame` in 
[Python/pystate.c](../Python/pystate.c)),
+which improves memory locality and reduces overhead.
+If the current `datastack_chunk` has enough space 
(`_PyThreadState_HasStackSpace`)
+then the lightweight `_PyFrame_PushUnchecked` can be used instead of 
`_PyThreadState_PushFrame`.
 
 Sometimes an actual `PyFrameObject` is needed, such as when Python code calls
 `sys._getframe()` or an extension module calls

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to