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

DinoV merged 1 commit into
python:mainfrom
DinoV:nogil_dict_obj_qsbr

Conversation

@DinoV

@DinoV DinoV 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 thread Objects/obmalloc.c Resolved
Comment thread Python/gc_free_threading.c Resolved
Comment thread Objects/obmalloc.c Resolved
Comment thread Python/gc_free_threading.c Resolved
Comment thread Objects/obmalloc.c Resolved
Comment thread Python/gc_free_threading.c Resolved
@DinoV DinoV changed the title gh-112075: Nogil dict obj qsbr Mar 5, 2024
@DinoV
DinoV force-pushed the nogil_dict_obj_qsbr branch from d764284 to faa4484 Compare March 5, 2024 23:31
@DinoV
DinoV marked this pull request as ready for review March 6, 2024 15:53
@DinoV
DinoV requested a review from ericsnowcurrently as a code owner March 6, 2024 15:53

@colesbury colesbury 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:main Mar 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants