1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2014-06-03 09:47:54 +00:00
parent 29bee7e8ea
commit a5fd4c45e3
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Jun 3 18:43:51 2014 Koichi Sasada <ko1@atdot.net>
* 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@atdot.net>
* gc.c (rb_gc_call_finalizer_at_exit): add

View file

@ -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