ruby-changes:13993
From: shyouhei <ko1@a...>
Date: Mon, 16 Nov 2009 20:01:24 +0900 (JST)
Subject: [ruby-changes:13993] Ruby:r25801 (ruby_1_8_7): merge revision(s) 24713:
shyouhei 2009-11-16 20:00:15 +0900 (Mon, 16 Nov 2009) New Revision: 25801 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25801 Log: merge revision(s) 24713: * gc.c (gc_sweep): makes new room if object space is full of finalized objects and has no free objects. [ruby-dev:39201] Modified files: branches/ruby_1_8_7/ChangeLog branches/ruby_1_8_7/gc.c branches/ruby_1_8_7/test/ruby/test_gc.rb branches/ruby_1_8_7/version.h Index: ruby_1_8_7/ChangeLog =================================================================== --- ruby_1_8_7/ChangeLog (revision 25800) +++ ruby_1_8_7/ChangeLog (revision 25801) @@ -1,3 +1,8 @@ +Mon Nov 16 19:58:02 2009 Nobuyoshi Nakada <nobu@r...> + + * gc.c (gc_sweep): makes new room if object space is full of + finalized objects and has no free objects. [ruby-dev:39201] + Mon Nov 16 19:45:27 2009 Tanaka Akira <akr@f...> * util.c: suppress strict-aliasing warning with gcc-4.4.0 -O2 to fix Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 25800) +++ ruby_1_8_7/version.h (revision 25801) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-11-16" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20091116 -#define RUBY_PATCHLEVEL 204 +#define RUBY_PATCHLEVEL 205 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_7/test/ruby/test_gc.rb =================================================================== --- ruby_1_8_7/test/ruby/test_gc.rb (revision 25800) +++ ruby_1_8_7/test/ruby/test_gc.rb (revision 25801) @@ -26,5 +26,9 @@ } GC.start assert true # reach here or dumps core + 100000.times { + Time.now + } + assert true, '[ruby-dev:39201]' # reach here or dumps core end end Index: ruby_1_8_7/gc.c =================================================================== --- ruby_1_8_7/gc.c (revision 25800) +++ ruby_1_8_7/gc.c (revision 25801) @@ -1223,7 +1223,15 @@ /* clear finalization list */ if (final_list) { deferred_final_list = final_list; - rb_thread_pending = 1; + if (!freelist && !rb_thread_critical) { + rb_gc_finalize_deferred(); + } + else { + rb_thread_pending = 1; + } + if (!freelist) { + add_heap(); + } return; } free_unused_heaps(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/