Uh oh!
There was an error while loading. Please reload this page.
gh-112087: Store memory allocation information into _PyListArray - #116529
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| PyObject **old_items = self->ob_item; | ||
| if (self->ob_item) { | ||
| if (allocated < new_allocated) { | ||
| memcpy(&array->ob_item, self->ob_item, allocated * sizeof(PyObject*)); |
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`. | |||
There was a problem hiding this comment.
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.
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.
| #ifdef Py_GIL_DISABLED | ||
| typedef struct { | ||
| Py_ssize_t allocated; | ||
| PyObject *ob_item; |
There was a problem hiding this comment.
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
| @@ -0,0 +1 @@ | |||
| :class:`list` is now compatible with the implementation of :pep:`703`. | |||
There was a problem hiding this comment.
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