Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-112087: Store memory allocation information into _PyListArray#116529
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
corona10 commented Mar 9, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Objects/listobject.c Outdated
| PyObject**old_items=self->ob_item; | ||
| if (self->ob_item){ | ||
| if (allocated<new_allocated){ | ||
| memcpy(&array->ob_item, self->ob_item, allocated*sizeof(PyObject*)); |
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.
Thank you for catching shrink case, @colesbury
bedevere-bot commented Mar 9, 2024
bedevere-bot commented Mar 9, 2024
bedevere-bot commented Mar 9, 2024
| @@ -0,0 +1 @@ | |||
| :class:`list` is now compatible with the implementation of :pep:`703`. | |||
corona10Mar 9, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
This PR should be the final PR for #112087.
I think that we can close the issue, and after GIL is disabled, we can track relevant issues from a separate issue.
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.
One more thing I noticed here is that list.sort should have a critical section
corona10 commented Mar 9, 2024
PPC related failure: Not related to this PR. |
bedevere-bot commented Mar 9, 2024
bedevere-bot commented Mar 9, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Objects/listobject.c Outdated
| #ifdefPy_GIL_DISABLED | ||
| typedefstruct{ | ||
| Py_ssize_tallocated; | ||
| PyObject*ob_item; |
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.
This needs to be a flexible array member like:
| PyObject*ob_item; | |
| PyObject*ob_item[]; |
Like dk_indices in PyDictKeysObject
cpython/Include/internal/pycore_dict.h
Line 167 in 1e68c4b
| chardk_indices[]; /* char is required to avoid strict aliasing. */ |
| @@ -0,0 +1 @@ | |||
| :class:`list` is now compatible with the implementation of :pep:`703`. | |||
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.
One more thing I noticed here is that list.sort should have a critical section
corona10 commented Mar 9, 2024
I will submit the PR right a way. |
listobjects thread-safe in--disable-gilbuilds #112087