<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/internal/gc.h, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Add `RUBY_REFERENCES`</title>
<updated>2023-11-30T12:39:28+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-26T10:09:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0cdad3b92a7e117bc7e36779140f5c83b07ca7ce'/>
<id>0cdad3b92a7e117bc7e36779140f5c83b07ca7ce</id>
<content type='text'>
Instead of `RUBY_REFERENCES_START` and `RUBY_REFERENCES_END`, so that
auto-indent works well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of `RUBY_REFERENCES_START` and `RUBY_REFERENCES_END`, so that
auto-indent works well.
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefix `REF_EDGE` and `REFS_LIST_PTR` with `RUBY_`</title>
<updated>2023-11-30T12:39:28+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-26T07:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=30f7b7a0535575a4995ea59086830ee19c79ea82'/>
<id>30f7b7a0535575a4995ea59086830ee19c79ea82</id>
<content type='text'>
Also move `struct` so that `typedef`-ed names can be used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also move `struct` so that `typedef`-ed names can be used.
</pre>
</div>
</content>
</entry>
<entry>
<title>Constify `RUBY_REFERENCES_START` tables</title>
<updated>2023-11-26T07:04:23+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-11-26T07:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e81c380c0fb3611d5507bfa169b0437a8712ea7c'/>
<id>e81c380c0fb3611d5507bfa169b0437a8712ea7c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove reference to USE_RINCGC</title>
<updated>2023-07-04T13:14:34+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-06-27T08:21:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9178a9987709efd74829462380e623e86a8de502'/>
<id>9178a9987709efd74829462380e623e86a8de502</id>
<content type='text'>
This compile time flag was removed in https://github.com/ruby/ruby/pull/7313

This commit cleans up some related dead code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This compile time flag was removed in https://github.com/ruby/ruby/pull/7313

This commit cleans up some related dead code.
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19584] [DOC] Tweek description of `rb_gc_register_address`</title>
<updated>2023-04-07T04:42:58+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2023-04-07T03:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4adcfc8cd7a17593a6590025da2b03eebf4fd63c'/>
<id>4adcfc8cd7a17593a6590025da2b03eebf4fd63c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[Feature #19406] Allow declarative definition of references</title>
<updated>2023-03-17T19:20:40+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-03-16T22:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7142328a94c85cc5f23630396f248b32133f87ab'/>
<id>7142328a94c85cc5f23630396f248b32133f87ab</id>
<content type='text'>
When using rb_data_type_struct to wrap a C struct, that C struct can
contain VALUE references to other Ruby objects.

If this is the case then one must also define dmark and optionally
dcompact callbacks in order to allow these objects to be correctly
handled by the GC. This is suboptimal as it requires GC related logic to
be implemented by extension developers. This can be a cause of subtle
bugs when references are not marked of updated correctly inside these
callbacks.

This commit provides an alternative approach, useful in the simple case
where the C struct contains VALUE members (ie. there isn't any
conditional logic, or data structure manipulation required to traverse
these references).

In this case references can be defined using a declarative syntax
as a list of edges (or, pointers to references).

A flag can be set on the rb_data_type_struct to notify the GC that
declarative references are being used, and a list of those references
can be assigned to the dmark pointer instead of a function callback, on
the rb_data_type_struct.

Macros are also provided for simple declaration of the reference list,
and building edges.

To avoid having to also find space in the struct to define a length for
the references list, I've chosed to always terminate the references list
with RUBY_REF_END - defined as UINTPTR_MAX. My assumption is that no
single struct will ever be large enough that UINTPTR_MAX is actually a
valid reference.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using rb_data_type_struct to wrap a C struct, that C struct can
contain VALUE references to other Ruby objects.

If this is the case then one must also define dmark and optionally
dcompact callbacks in order to allow these objects to be correctly
handled by the GC. This is suboptimal as it requires GC related logic to
be implemented by extension developers. This can be a cause of subtle
bugs when references are not marked of updated correctly inside these
callbacks.

This commit provides an alternative approach, useful in the simple case
where the C struct contains VALUE members (ie. there isn't any
conditional logic, or data structure manipulation required to traverse
these references).

In this case references can be defined using a declarative syntax
as a list of edges (or, pointers to references).

A flag can be set on the rb_data_type_struct to notify the GC that
declarative references are being used, and a list of those references
can be assigned to the dmark pointer instead of a function callback, on
the rb_data_type_struct.

Macros are also provided for simple declaration of the reference list,
and building edges.

To avoid having to also find space in the struct to define a length for
the references list, I've chosed to always terminate the references list
with RUBY_REF_END - defined as UINTPTR_MAX. My assumption is that no
single struct will ever be large enough that UINTPTR_MAX is actually a
valid reference.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge internal/rgengc.h and internal/gc.h</title>
<updated>2023-02-28T17:09:00+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-02-13T13:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=460f399c5a08267beadd5e840b856ae5fac1e56a'/>
<id>460f399c5a08267beadd5e840b856ae5fac1e56a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge internal/intern/gc.h into internal/gc.h</title>
<updated>2023-02-27T18:11:56+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2023-02-16T13:20:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ae5e62ee9070057767d7ae7d4494dd9e1c7fc70e'/>
<id>ae5e62ee9070057767d7ae7d4494dd9e1c7fc70e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>sed -i 's/. They/.  They/'</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-01-14T06:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=94e5953b484517234ad476b1e179d1bdbcbafbd7'/>
<id>94e5953b484517234ad476b1e179d1bdbcbafbd7</id>
<content type='text'>
Truly editorial fix for comments.  This works better with Emacs'
set-justification-full function. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Truly editorial fix for comments.  This works better with Emacs'
set-justification-full function. [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix docs about movement for rb_gc_register_mark_object()</title>
<updated>2020-12-01T20:23:09+00:00</updated>
<author>
<name>Alan Wu</name>
<email>XrXr@users.noreply.github.com</email>
</author>
<published>2020-11-25T22:33:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=56141d38a3f3910d883e1dde754998ce10b79a58'/>
<id>56141d38a3f3910d883e1dde754998ce10b79a58</id>
<content type='text'>
This API in fact pins objects passed to it. See vm.c:2546.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This API in fact pins objects passed to it. See vm.c:2546.
</pre>
</div>
</content>
</entry>
</feed>
