8000 GH-100240: Generic freelist, applied to ints by iritkatriel · Pull Request #101453 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-100240: Generic freelist, applied to ints #101453

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

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reuse _PyFreeList_Clear
  • Loading branch information
iritkatriel committed Feb 3, 2023
commit a33061f0471d637d903028afe0657caa95bfff8f
11 changes: 1 addition & 10 deletions Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,16 +767,7 @@ _PyFreeList_FreeToFull(_PyFreeList *list, void *ptr)
if (list->ptr == NULL) {
return;
}
int space = 0;
void *head = list->ptr;
while (head) {
void *next = *((void**)head);
PyObject_Free(head);
head = next;
space++;
}
list->ptr = ptr;
list->space = space;
_PyFreeList_Clear(list);
}
#endif /* WITH_FREELISTS */

Expand Down
0