-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-81381: Reduce allocated size of PyType_GenericAlloc if possible #100855
Conversation
corona10
commented
Jan 8, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: PyType_GenericAlloc might over-allocate memory #81381
|
What's the conclusion here? Based on the comment above, |
I may need more investigation but...
I think so too, we can not expect which type of flag will be safe.
It's up to the situation that objects will be created a lot, but I am not sure it's worth to adding the flag to reduce it. |
I'd like to understand this better. For things of exact type Line 157 in ef633e5
For subclasses of @corona10 Could you give some more context for the trace you show? |
So if I'm reading this right, this looks like what would happen if one did But I'm not really sure what I'm looking at above. @corona10: does this sound plausible? If so, I think there is indeed a bug in |
I've opened an issue and a PR (#101038). If #101038 goes in, I think that fixes the issue that @corona10 was reporting in #100855 (comment).
Agreed; I think that means that #101038 doesn't unblock this PR, unfortunately. Could there be other options, like adding a (private, for now) variant of For the root problem, the 3-element |