summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-05-21 09:57:35 (GMT)
committerGitHub <noreply@github.com>2021-05-21 09:57:35 (GMT)
commitb11a951f16f0603d98de24fee5c023df83ea552c (patch)
tree82e7807515db0e284d9ebc3b8c3ba6ff08699ea5 /Lib/test/test_sys.py
parentbe4dd7fcd93ed29d362c4bbcc48151bc619d6595 (diff)
downloadcpython-b11a951f16f0603d98de24fee5c023df83ea552c.zip
cpython-b11a951f16f0603d98de24fee5c023df83ea552c.tar.gz
cpython-b11a951f16f0603d98de24fee5c023df83ea552c.tar.bz2
bpo-44032: Move data stack to thread from FrameObject. (GH-26076)
* Remove 'zombie' frames. We won't need them once we are allocating fixed-size frames. * Add co_nlocalplus field to code object to avoid recomputing size of locals + frees + cells. * Move locals, cells and freevars out of frame object into separate memory buffer. * Use per-threadstate allocated memory chunks for local variables. * Move globals and builtins from frame object to per-thread stack. * Move (slow) locals frame object to per-thread stack. * Move internal frame functions to internal header.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 4f26689..6574c4f 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1274,11 +1274,7 @@ class SizeofTest(unittest.TestCase):
# frame
import inspect
x = inspect.currentframe()
- ncells = len(x.f_code.co_cellvars)
- nfrees = len(x.f_code.co_freevars)
- localsplus = x.f_code.co_stacksize + x.f_code.co_nlocals +\
- ncells + nfrees
- check(x, vsize('8P3i3c' + localsplus*'P'))
+ check(x, size('5P3i4cP'))
# function
def func(): pass
check(func, size('14P'))