<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/memory_view.c, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Use RB_VM_LOCKING</title>
<updated>2025-05-25T06:22:43+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-05-23T11:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aad9fa285398d48b5647f8a36922b8d817a24156'/>
<id>aad9fa285398d48b5647f8a36922b8d817a24156</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor VM root modules</title>
<updated>2024-03-06T20:33:43+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>byroot@ruby-lang.org</email>
</author>
<published>2024-03-03T09:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d4f3dcf4dff80ded472ba3061e62c6c676ffab8c'/>
<id>d4f3dcf4dff80ded472ba3061e62c6c676ffab8c</id>
<content type='text'>
This `st_table` is used to both mark and pin classes
defined from the C API. But `vm-&gt;mark_object_ary` already
does both much more efficiently.

Currently a Ruby process starts with 252 rooted classes,
which uses `7224B` in an `st_table` or `2016B` in an `RArray`.

So a baseline of 5kB saved, but since `mark_object_ary` is
preallocated with `1024` slots but only use `405` of them,
it's a net `7kB` save.

`vm-&gt;mark_object_ary` is also being refactored.

Prior to this changes, `mark_object_ary` was a regular `RArray`, but
since this allows for references to be moved, it was marked a second
time from `rb_vm_mark()` to pin these objects.

This has the detrimental effect of marking these references on every
minors even though it's a mostly append only list.

But using a custom TypedData we can save from having to mark
all the references on minor GC runs.

Addtionally, immediate values are now ignored and not appended
to `vm-&gt;mark_object_ary` as it's just wasted space.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This `st_table` is used to both mark and pin classes
defined from the C API. But `vm-&gt;mark_object_ary` already
does both much more efficiently.

Currently a Ruby process starts with 252 rooted classes,
which uses `7224B` in an `st_table` or `2016B` in an `RArray`.

So a baseline of 5kB saved, but since `mark_object_ary` is
preallocated with `1024` slots but only use `405` of them,
it's a net `7kB` save.

`vm-&gt;mark_object_ary` is also being refactored.

Prior to this changes, `mark_object_ary` was a regular `RArray`, but
since this allows for references to be moved, it was marked a second
time from `rb_vm_mark()` to pin these objects.

This has the detrimental effect of marking these references on every
minors even though it's a mostly append only list.

But using a custom TypedData we can save from having to mark
all the references on minor GC runs.

Addtionally, immediate values are now ignored and not appended
to `vm-&gt;mark_object_ary` as it's just wasted space.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove null checks for xfree</title>
<updated>2024-01-19T15:25:02+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-01-17T20:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d0b774cfb8ddf075c23d1b5ab1fc6f47123ccf65'/>
<id>d0b774cfb8ddf075c23d1b5ab1fc6f47123ccf65</id>
<content type='text'>
xfree can handle null values, so we don't need to check it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
xfree can handle null values, so we don't need to check it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expand tabs [ci skip]</title>
<updated>2022-07-21T16:42:04+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-07-21T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b21e94bebed90180d8ff63dad03b8b948361089'/>
<id>5b21e94bebed90180d8ff63dad03b8b948361089</id>
<content type='text'>
[Misc #18891]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Misc #18891]
</pre>
</div>
</content>
</entry>
<entry>
<title>Only check class ancestors for ivar in memory_view</title>
<updated>2022-05-27T20:38:40+00:00</updated>
<author>
<name>John Hawthorn</name>
<email>john@hawthorn.email</email>
</author>
<published>2022-02-06T21:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fc184ca1f789ce6a89e83b9247b6bd172af7c659'/>
<id>fc184ca1f789ce6a89e83b9247b6bd172af7c659</id>
<content type='text'>
rb_class_get_superclass returns the immediate SUPER, including T_ICLASS.
rb_ivar_lookup isn't implemented for T_ICLASS so it uses the default
behaviour, which always returns Qnil.

This commit avoids checking T_ICLASS for ivars.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rb_class_get_superclass returns the immediate SUPER, including T_ICLASS.
rb_ivar_lookup isn't implemented for T_ICLASS so it uses the default
behaviour, which always returns Qnil.

This commit avoids checking T_ICLASS for ivars.
</pre>
</div>
</content>
</entry>
<entry>
<title>memory_view.c: Add _memory_view_entry member in rb_memory_view_t (#5088)</title>
<updated>2021-11-08T03:52:09+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@users.noreply.github.com</email>
</author>
<published>2021-11-08T03:52:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3501e0cbb5b6043b851686d2649e5ff7e9cf2b77'/>
<id>3501e0cbb5b6043b851686d2649e5ff7e9cf2b77</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>memory_view.c: Rename private to private_data for C++ (#4812)</title>
<updated>2021-09-06T07:01:52+00:00</updated>
<author>
<name>Kenta Murata</name>
<email>mrkn@users.noreply.github.com</email>
</author>
<published>2021-09-06T07:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f8bb2d9b2724b4a74322ac82d27c32a61153e8dd'/>
<id>f8bb2d9b2724b4a74322ac82d27c32a61153e8dd</id>
<content type='text'>
* memory_view.c: Rename private to private_data for C++

* doc/memory_view.md: Update document

* Fix doc/memory_view.md

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* memory_view.c: Rename private to private_data for C++

* doc/memory_view.md: Update document

* Fix doc/memory_view.md

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Moved exported symbols in internal/util.h to ruby/util.h</title>
<updated>2021-08-24T01:37:41+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-07-28T07:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c38c2d8ee26c70300e2e0a4eec867273a8520579'/>
<id>c38c2d8ee26c70300e2e0a4eec867273a8520579</id>
<content type='text'>
[Feature #18051]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Feature #18051]
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust styles [ci skip]</title>
<updated>2021-06-17T01:13:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-06-16T13:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e4f891ce8d4833fea1e1f9abd69c2896d429a948'/>
<id>e4f891ce8d4833fea1e1f9abd69c2896d429a948</id>
<content type='text'>
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix trivial -Wundef warnings</title>
<updated>2021-05-04T12:56:55+00:00</updated>
<author>
<name>Benoit Daloze</name>
<email>eregontp@gmail.com</email>
</author>
<published>2021-04-29T12:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68d6bd0873557c12bec6f8e0f8db622f1499d8a7'/>
<id>68d6bd0873557c12bec6f8e0f8db622f1499d8a7</id>
<content type='text'>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* See [Feature #17752]

Co-authored-by: xtkoba (Tee KOBAYASHI) &lt;xtkoba+ruby@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
