diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-02-01 09:25:12 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-02-02 09:52:04 -0500 |
commit | 7b77d46671685c837adc33b39ae0210e04cd8b24 (patch) | |
tree | 426dd92de0af81c4d6cbc3f0af732cc7fe80ede8 /test/ruby/test_gc.rb | |
parent | af107710457b4bd148c6e5ee7a336ed4961f5423 (diff) |
Decouple GC slot sizes from RVALUE
Add a new macro BASE_SLOT_SIZE that determines the slot size.
For Variable Width Allocation (compiled with USE_RVARGC=1), all slot
sizes are powers-of-2 multiples of BASE_SLOT_SIZE.
For USE_RVARGC=0, BASE_SLOT_SIZE is set to sizeof(RVALUE).
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5517
Diffstat (limited to 'test/ruby/test_gc.rb')
-rw-r--r-- | test/ruby/test_gc.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 788f2974b5..fc49659c27 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -152,7 +152,7 @@ class TestGc < Test::Unit::TestCase GC.stat_heap(i, stat_heap) GC.stat(stat) - assert_equal GC::INTERNAL_CONSTANTS[:RVALUE_SIZE] * (2**i), stat_heap[:slot_size] + assert_equal GC::INTERNAL_CONSTANTS[:BASE_SLOT_SIZE] * (2**i), stat_heap[:slot_size] assert_operator stat_heap[:heap_allocatable_pages], :<=, stat[:heap_allocatable_pages] assert_operator stat_heap[:heap_eden_pages], :<=, stat[:heap_eden_pages] assert_operator stat_heap[:heap_eden_slots], :>=, 0 |