Skip to content

gh-112075: Support freeing object memory via QSBR - #116344

Merged
DinoV merged 1 commit into
python:mainfrom
DinoV:nogil_dict_obj_qsbr
Mar 8, 2024
Merged

gh-112075: Support freeing object memory via QSBR#116344
DinoV merged 1 commit into
python:mainfrom
DinoV:nogil_dict_obj_qsbr

Conversation

@DinoV

@DinoVDinoV commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

Adds support for freeing GC objects with QSBR. This will enable objects with in-lined values to be freed.

Currently this is just freeing any object that gets shared as being freed by QSBR. We may want to break this into 2 bits so that when we mark a dict or a list as shared that the underlying object gets freed and only the values get delayed.

Comment threadObjects/obmalloc.c Outdated
Comment threadPython/gc_free_threading.c Outdated
Comment threadObjects/obmalloc.c Outdated
Comment threadPython/gc_free_threading.c Outdated
Comment threadObjects/obmalloc.c Outdated
Comment threadPython/gc_free_threading.c
@DinoVDinoV changed the title gh-112075: Nogil dict obj qsbrgh-112075: Support freeing object memory via QSBRMar 5, 2024
@DinoV
DinoVforce-pushed the nogil_dict_obj_qsbr branch from d764284 to faa4484CompareMarch 5, 2024 23:31
@DinoV
DinoV marked this pull request as ready for review March 6, 2024 15:53

@colesburycolesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DinoV
DinoV merged commit 7db871e into python:mainMar 8, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@DinoV
DinoV deleted the nogil_dict_obj_qsbr branch May 31, 2024 18:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@DinoV@colesbury