<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_gc.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>rb_raise when attempting to set the GC implementation name</title>
<updated>2024-11-14T10:46:36+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2024-11-11T12:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=42501015b4ffac67671cc5e1daedbacf5840d71b'/>
<id>42501015b4ffac67671cc5e1daedbacf5840d71b</id>
<content type='text'>
Instead of silently ignoring the key, we should raise to clearly tell
the user that this key is read-only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of silently ignoring the key, we should raise to clearly tell
the user that this key is read-only.
</pre>
</div>
</content>
</entry>
<entry>
<title>Expose GC.config[:implementation], to query the currently active GC</title>
<updated>2024-11-14T10:46:36+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2024-10-08T11:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fa10441981c89deec914ba243360b40c5aede6ed'/>
<id>fa10441981c89deec914ba243360b40c5aede6ed</id>
<content type='text'>
And a default and readonly key to the GC.config hash that names the
current GC implementation.

This is provided by each implementation by the API function
rb_gc_impl_active_gc_name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And a default and readonly key to the GC.config hash that names the
current GC implementation.

This is provided by each implementation by the API function
rb_gc_impl_active_gc_name
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix flakiness in TestGc#test_thrashing_for_young_objects</title>
<updated>2024-11-06T14:58:47+00:00</updated>
<author>
<name>KJ Tsanaktsidis</name>
<email>kj@kjtsanaktsidis.id.au</email>
</author>
<published>2024-11-05T02:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=96e695ad00b78cf7090eebdb4cfa9dd3350bd299'/>
<id>96e695ad00b78cf7090eebdb4cfa9dd3350bd299</id>
<content type='text'>
I caught a reproduction of this test failing under rr, and was able to
replay it to isolate the failure. The call to
`before_stat_heap = GC.stat_heap` is itself allocating a hash, which in
unlucky circumstances can result in a new page being allocated and thus
`before_stats[:heap_allocated_pages]` no longer equals
`after_stats[:heap_allocated_pages]`.

The solution is to use the form of GC.stat/stat_heap which takes a hash
as an argument, and thus needs to perform no Ruby allocations itself.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I caught a reproduction of this test failing under rr, and was able to
replay it to isolate the failure. The call to
`before_stat_heap = GC.stat_heap` is itself allocating a hash, which in
unlucky circumstances can result in a new page being allocated and thus
`before_stats[:heap_allocated_pages]` no longer equals
`after_stats[:heap_allocated_pages]`.

The solution is to use the form of GC.stat/stat_heap which takes a hash
as an argument, and thus needs to perform no Ruby allocations itself.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove defined check for GC.config in test_gc.rb</title>
<updated>2024-10-11T15:35:45+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-10-10T15:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2dab59933c469e50e66ac2adc2d9bb73554e2e21'/>
<id>2dab59933c469e50e66ac2adc2d9bb73554e2e21</id>
<content type='text'>
GC.config is always defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GC.config is always defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in test_gc.rb [ci skip]</title>
<updated>2024-10-10T15:44:52+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-10-10T15:44:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9df86a86af00cbf4baee42ba22ddf754fc6324d4'/>
<id>9df86a86af00cbf4baee42ba22ddf754fc6324d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename size_pool -&gt; heap</title>
<updated>2024-10-03T20:20:09+00:00</updated>
<author>
<name>Matt Valentine-House</name>
<email>matt@eightbitraptor.com</email>
</author>
<published>2024-10-03T12:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8e7df4b7c674cf408fa570b9593811167bbff04a'/>
<id>8e7df4b7c674cf408fa570b9593811167bbff04a</id>
<content type='text'>
Now that we've inlined the eden_heap into the size_pool, we should
rename the size_pool to heap. So that Ruby contains multiple heaps, with
different sized objects.

The term heap as a collection of memory pages is more in memory
management nomenclature, whereas size_pool was a name chosen out of
necessity during the development of the Variable Width Allocation
features of Ruby.

The concept of size pools was introduced in order to facilitate
different sized objects (other than the default 40 bytes). They wrapped
the eden heap and the tomb heap, and some related state, and provided a
reasonably simple way of duplicating all related concerns, to provide
multiple pools that all shared the same structure but held different
objects.

Since then various changes have happend in Ruby's memory layout:

* The concept of tomb heaps has been replaced by a global free pages list,
  with each page having it's slot size reconfigured at the point when it
  is resurrected
* the eden heap has been inlined into the size pool itself, so that now
  the size pool directly controls the free_pages list, the sweeping
  page, the compaction cursor and the other state that was previously
  being managed by the eden heap.

Now that there is no need for a heap wrapper, we should refer to the
collection of pages containing Ruby objects as a heap again rather than
a size pool
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we've inlined the eden_heap into the size_pool, we should
rename the size_pool to heap. So that Ruby contains multiple heaps, with
different sized objects.

The term heap as a collection of memory pages is more in memory
management nomenclature, whereas size_pool was a name chosen out of
necessity during the development of the Variable Width Allocation
features of Ruby.

The concept of size pools was introduced in order to facilitate
different sized objects (other than the default 40 bytes). They wrapped
the eden heap and the tomb heap, and some related state, and provided a
reasonably simple way of duplicating all related concerns, to provide
multiple pools that all shared the same structure but held different
objects.

Since then various changes have happend in Ruby's memory layout:

* The concept of tomb heaps has been replaced by a global free pages list,
  with each page having it's slot size reconfigured at the point when it
  is resurrected
* the eden heap has been inlined into the size pool itself, so that now
  the size pool directly controls the free_pages list, the sweeping
  page, the compaction cursor and the other state that was previously
  being managed by the eden heap.

Now that there is no need for a heap wrapper, we should refer to the
collection of pages containing Ruby objects as a heap again rather than
a size pool
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace all GC.disable with EnvUtil.without_gc</title>
<updated>2024-09-17T14:34:26+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-09-16T19:29:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0160dafc4c52b84bb1f989670b54186505649493'/>
<id>0160dafc4c52b84bb1f989670b54186505649493</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add keys to GC.stat and fix tests</title>
<updated>2024-09-09T14:15:21+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-09-06T19:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a502c1873165418a866eb817b44944a6a8784cb'/>
<id>5a502c1873165418a866eb817b44944a6a8784cb</id>
<content type='text'>
This adds keys heap_empty_pages and heap_allocatable_slots to GC.stat.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds keys heap_empty_pages and heap_allocatable_slots to GC.stat.
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch sorted list of pages in the GC to a darray</title>
<updated>2024-09-09T14:15:21+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-09-04T15:59:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b66d6e48c8832edebcf7e6d667d10702ddbce42c'/>
<id>b66d6e48c8832edebcf7e6d667d10702ddbce42c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix flaky test_latest_gc_info_need_major_by</title>
<updated>2024-09-02T22:14:48+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-30T19:17:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1b82d6346227dd451003802a09f4abed5eb732bd'/>
<id>1b82d6346227dd451003802a09f4abed5eb732bd</id>
<content type='text'>
It's possible for a GC to run between the calls of GC.latest_gc_info,
which would cause the test to fail. We can disable GC so that GC only
triggers manually.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's possible for a GC to run between the calls of GC.latest_gc_info,
which would cause the test to fail. We can disable GC so that GC only
triggers manually.
</pre>
</div>
</content>
</entry>
</feed>
