ruby-changes:34258
From: ko1 <ko1@a...>
Date: Tue, 3 Jun 2014 18:48:05 +0900 (JST)
Subject: [ruby-changes:34258] ko1:r46339 (trunk): * test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj.
ko1 2014-06-03 18:47:54 +0900 (Tue, 03 Jun 2014) New Revision: 46339 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46339 Log: * test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj. GC allows extending pages depends on heap_increment. Modified files: trunk/ChangeLog trunk/test/ruby/test_gc.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46338) +++ ChangeLog (revision 46339) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jun 3 18:43:51 2014 Koichi Sasada <ko1@a...> + + * test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj. + GC allows extending pages depends on heap_increment. + Tue Jun 3 18:01:27 2014 Koichi Sasada <ko1@a...> * gc.c (rb_gc_call_finalizer_at_exit): add Index: test/ruby/test_gc.rb =================================================================== --- test/ruby/test_gc.rb (revision 46338) +++ test/ruby/test_gc.rb (revision 46339) @@ -107,7 +107,8 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L107 def test_latest_gc_info GC.start - GC.stat(:heap_free_slot).times{ "a" + "b" } + count = GC.stat(:heap_free_slot) + GC.stat(:heap_increment) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT] + count.times{ "a" + "b" } assert_equal :newobj, GC.latest_gc_info[:gc_by] GC.start -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/