diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-09 09:33:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-09 09:33:52 +0000 |
commit | 8ee9071cbe0a3a51af11127f9e336e68758c1bc9 (patch) | |
tree | b57df78e6494e035828947630d81fdbd8464afc5 /test/ruby | |
parent | eb7a7801bf9cf53f620dd8aa0280694f9cf35b40 (diff) | |
download | ruby-8ee9071cbe0a3a51af11127f9e336e68758c1bc9.tar.gz |
* gc.c (rb_objspace_t::heap_pages): rename field names:
* used -> allocated_pages
* increment -> allocatable_pages
* length -> sorted_length
And remove unused `limt' field.
* gc.c: rename macros:
* heap_pages_used -> heap_allocated_pages
* heap_pages_length -> heap_pages_sorted_length
* heap_pages_increment -> heap_allocatable_pages
* gc.c (gc_stat_internal): fix symbol names
ref: [Feature #9924]
https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing
Yellow color fields in this table are changed.
* test/ruby/test_gc.rb: catch up this change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_gc.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 0b0356f1b8..5f44d75b79 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -113,7 +113,7 @@ class TestGc < Test::Unit::TestCase def test_latest_gc_info GC.start - count = GC.stat(:heap_free_slot) + GC.stat(:heap_increment) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT] + count = GC.stat(:heap_free_slot) + GC.stat(:heap_allocatable_pages) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT] count.times{ "a" + "b" } assert_equal :newobj, GC.latest_gc_info[:gc_by] @@ -273,16 +273,16 @@ class TestGc < Test::Unit::TestCase def test_expand_heap assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom' GC.start - base_length = GC.stat[:heap_eden_page_length] + base_length = GC.stat[:heap_eden_pages] (base_length * 500).times{ 'a' } GC.start - assert_in_delta base_length, (v = GC.stat[:heap_eden_page_length]), 1, - "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_page_length]: #{v})" + assert_in_delta base_length, (v = GC.stat[:heap_eden_pages]), 1, + "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_pages]: #{v})" a = [] (base_length * 500).times{ a << 'a'; nil } GC.start - assert_operator base_length, :<, GC.stat[:heap_eden_page_length] + 1 + assert_operator base_length, :<, GC.stat[:heap_eden_pages] + 1 eom end |