Skip to content

Mark Closure, Function and Handle as write barrier protected - #129

Merged
kou merged 1 commit into
ruby:masterfrom
casperisfine:dummy-write-barriers
May 26, 2023
Merged

Mark Closure, Function and Handle as write barrier protected#129
kou merged 1 commit into
ruby:masterfrom
casperisfine:dummy-write-barriers

Conversation

@casperisfine

Copy link
Copy Markdown
Contributor

They don't have a mark function, so they don't need any change.

@casperisfine
casperisfineforce-pushed the dummy-write-barriers branch from a3e74fb to a4e7a6fCompareMay 25, 2023 10:57
They don't have a mark function, so they don't need any change.
@casperisfine
casperisfineforce-pushed the dummy-write-barriers branch from a4e7a6f to ed014aaCompareMay 25, 2023 10:57
Comment threadext/fiddle/handle.c
.dfree = fiddle_handle_free,
.dsize = fiddle_handle_memsize
},
.flags = RUBY_TYPED_WB_PROTECTED,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we specify RUBY_TYPED_FREE_IMMEDIATELY here too?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Maybe?

The reason I didn't add it is that the dfree function calls dlclose and I don't know all the characteristics of it, so I don't know if it's safe to call from the GC.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see.

I think that we can add it after we improve Fiddle::Handle#[] to refer Fiddle::Handle from the returned symbol. We can ensure keeping Fiddle::Handle while its symbols are referred.

kou
kou approved these changes May 26, 2023

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Comment threadext/fiddle/handle.c
.dfree = fiddle_handle_free,
.dsize = fiddle_handle_memsize
},
.flags = RUBY_TYPED_WB_PROTECTED,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see.

I think that we can add it after we improve Fiddle::Handle#[] to refer Fiddle::Handle from the returned symbol. We can ensure keeping Fiddle::Handle while its symbols are referred.

@kou
kou merged commit 9bbc732 into ruby:masterMay 26, 2023
matzbot pushed a commit to ruby/ruby that referenced this pull request Jun 28, 2023
protected
(ruby/fiddle#129)
They don't have a mark function, so they don't need any change.
ruby/fiddle@9bbc732aef
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@casperisfine@kou@byroot