ruby-changes:55275
From: tenderlove <ko1@a...>
Date: Wed, 10 Apr 2019 05:47:43 +0900 (JST)
Subject: [ruby-changes:55275] tenderlove:r67482 (trunk): Try to make compaction more likely
tenderlove 2019-04-10 05:47:36 +0900 (Wed, 10 Apr 2019) New Revision: 67482 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67482 Log: Try to make compaction more likely This commit tries to make compaction more likely by allocating some objects and then throwing them away Modified files: trunk/test/ruby/test_gc_compact.rb Index: test/ruby/test_gc_compact.rb =================================================================== --- test/ruby/test_gc_compact.rb (revision 67481) +++ test/ruby/test_gc_compact.rb (revision 67482) @@ -23,7 +23,11 @@ class TestGCCompact < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc_compact.rb#L23 end def big_list - 1000.times.map { Object.new } # likely next to each other + 1000.times.map { + # try to make some empty slots by allocating an object and discarding + Object.new + Object.new + } # likely next to each other end # Find an object that's allocated in a slot that had a previous -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/