diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 10 | ||||
-rw-r--r-- | test/ruby/test_gc.rb | 4 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Nov 16 19:58:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@fsij.org> * util.c: suppress strict-aliasing warning with gcc-4.4.0 -O2 to fix @@ -1223,7 +1223,15 @@ gc_sweep() /* 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(); diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index d0b4e3df77..ed854bde65 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -26,5 +26,9 @@ class TestGc < Test::Unit::TestCase } 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 @@ -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 |