-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-128762: Include inline values in sys.getsizeof()
#128763
base: main
Are you sure you want to change the base?
Conversation
inline_values_size = 32 | ||
|
||
linked_list = None | ||
for i in range(28): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find that it needs this many iterations to "stabilize". Is there a right way to do this?
@@ -1475,6 +1479,16 @@ def test_gc_head_size(self): | |||
# but lists are | |||
self.assertEqual(sys.getsizeof([]), vsize('Pn') + gc_header_size) | |||
|
|||
def test_inline_values(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have overall low confidence that this is the right way to test this, and I'm open to suggestions.
sys.getsizeof()
sys.getsizeof()
does not include inline values #128762