summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-27 06:09:55 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-27 06:09:55 +0000
commit5993c141f1c457d45807c3338cdc268052ac2a4e (patch)
treef34326e36cc61fccd604013d2398b9c0c90a4378 /test
parent53f3ddfefb4131c20baa7589d022f7ffb0859c6b (diff)
* gc.c (gc_stat): add new information heap_eden_page_length and
heap_tomb_page_length. * test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length] instead of GC.stat[:heap_length]. This test expects `heap_eden_page_length' (used pages size). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_gc.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 40c5b1471f..da4a0b585d 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -200,15 +200,16 @@ class TestGc < Test::Unit::TestCase
def test_expand_heap
assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom'
- base_length = GC.stat[:heap_length]
- (base_length * 500).times{ 'a' }
GC.start
- assert_equal base_length, GC.stat[:heap_length], "invalid heap expanding"
+ base_length = GC.stat[:heap_eden_page_length]
+ (base_length * 500).times{ 'a'; nil }
+ GC.start
+ assert_equal base_length, GC.stat[:heap_eden_page_length], "invalid heap expanding"
a = []
- (base_length * 500).times{ a << 'a' }
+ (base_length * 500).times{ a << 'a'; nil }
GC.start
- assert base_length < GC.stat[:heap_length]
+ assert base_length < GC.stat[:heap_eden_page_length]
eom
end
end