Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
65349e5
Remove 'zombie' frames. We won't need them once we are allocating fix…
markshannon Apr 13, 2021
c1ac3ef
Add co_nlocalplus field to code object to avoid recomputing size of l…
markshannon Apr 13, 2021
431e1cb
Move locals, cells and freevars out of frame object into separate mem…
markshannon Apr 13, 2021
24a77d8
Use per-threadstate allocated memory chunks for local variables. Dumb…
markshannon Apr 13, 2021
19ac31a
Make per-thread data-stack a contiguous block of memory.
markshannon Apr 14, 2021
2d1a9db
Add comments about data stack sizes.
markshannon Apr 14, 2021
73c49d5
Use chunked stack, allows larger stack when needed with reduced memor…
markshannon May 4, 2021
8a9ae01
Delete obsolete comment and debug print statements
markshannon May 4, 2021
5a4803c
Move globals and builtins from frame object to per-thread stack.
markshannon May 5, 2021
a555393
Move (slow) locals frame object to per-thread stack.
markshannon May 7, 2021
f238598
Add back comment.
markshannon May 12, 2021
6cab045
Fix limit when popping block from data stack.
markshannon May 12, 2021
89f9496
Tidy up frame creation a bit.
markshannon May 12, 2021
0091341
Improve function name
markshannon May 12, 2021
2c14939
Make sure datastack memory is freed after fork.
markshannon May 13, 2021
ed93a22
Fix compiler warnings.
markshannon May 14, 2021
9204189
Add NEWS item
markshannon May 14, 2021
4e60017
Move internal frame functions to internal header.
markshannon May 19, 2021
7c53a6f
Fix compiler warning
markshannon May 19, 2021
61c3753
Add missing comment.
markshannon May 19, 2021
c5ccb7d
Add comment about what _PyObject_VirtualAlloc does.
markshannon May 20, 2021
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
Improve function name
  • Loading branch information
markshannon committed May 12, 2021
commit 0091341eec5eb439152d4c0281cee40eafb65042
4 changes: 2 additions & 2 deletions Include/cpython/frameobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);

PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);

int _PyFrame_StealLocals(PyFrameObject *f);

/** Internal -- Not to be used outside of the interpreter core */
int _PyFrame_TakeLocals(PyFrameObject *f);
PyObject *_PyFrame_GetGlobals(PyFrameObject *f);
PyObject *_PyFrame_GetBuiltins(PyFrameObject *f);
2 changes: 1 addition & 1 deletion Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ frame_alloc(PyCodeObject *code, PyObject **localsarray)
}

int
_PyFrame_StealLocals(PyFrameObject *f)
_PyFrame_TakeLocals(PyFrameObject *f)
{
assert(f->f_own_locals_memory == 0);
assert(f->f_stackdepth == 0);
Expand Down
2 changes: 1 addition & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -5183,7 +5183,7 @@ _PyEval_Vector(PyThreadState *tstate, PyFrameConstructor *con,
if (Py_REFCNT(f) > 1) {
Py_DECREF(f);
_PyObject_GC_TRACK(f);
if (_PyFrame_StealLocals(f)) {
if (_PyFrame_TakeLocals(f)) {
Py_CLEAR(retval);
}
}
Expand Down