diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-03 09:47:54 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-03 09:47:54 +0000 |
commit | a5fd4c45e37a53118e8385e9a91201fd6c99993c (patch) | |
tree | c549d4e9abf8ec17ea658c2071e2a463482a7273 /test/ruby | |
parent | 29bee7e8ea26e9540b61add2c774860f4c61d4ff (diff) | |
download | ruby-a5fd4c45e37a53118e8385e9a91201fd6c99993c.tar.gz |
* test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj.
GC allows extending pages depends on heap_increment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_gc.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 3d0bca6eff..00a49418ac 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -107,7 +107,8 @@ class TestGc < Test::Unit::TestCase 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 |