[前][次][番号順一覧][スレッド一覧]

ruby-changes:20897

From: nari <ko1@a...>
Date: Fri, 12 Aug 2011 14:05:28 +0900 (JST)
Subject: [ruby-changes:20897] nari:r32946 (ruby_1_9_3): * backport r32894 from trunk.

nari	2011-08-12 14:05:18 +0900 (Fri, 12 Aug 2011)

  New Revision: 32946

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32946

  Log:
    * backport r32894 from trunk.
    
    * gc.c (gc_lazy_sweep): if sweep target slots are not found, we
      try heap_increment() because it might be able to expand the
      heap. [Bug #5127] [ruby-dev:44285]
    
    * gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
      interrupted, we expand the heap if at all possible.

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/gc.c

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 32945)
+++ ruby_1_9_3/ChangeLog	(revision 32946)
@@ -1,3 +1,14 @@
+Fri Aug 12 13:53:03 2011  Narihiro Nakamura  <narihiro@n...>
+
+	* backport r32894 from trunk.
+
+	* gc.c (gc_lazy_sweep): if sweep target slots are not found, we
+	  try heap_increment() because it might be able to expand the
+	  heap. [Bug #5127] [ruby-dev:44285]
+
+	* gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
+	  interrupted, we expand the heap if at all possible.
+
 Fri Aug 12 12:28:17 2011  Eric Hodel  <drbrain@s...>
 
 	* lib/rake:  Update to Rake 0.9.2.2.  Prevent pollution of toplevel
Index: ruby_1_9_3/gc.c
===================================================================
--- ruby_1_9_3/gc.c	(revision 32945)
+++ ruby_1_9_3/gc.c	(revision 32946)
@@ -2172,6 +2172,12 @@
         }
         after_gc_sweep(objspace);
     }
+    else {
+        if (heaps_increment(objspace)) {
+            during_gc = 0;
+            return TRUE;
+        }
+    }
 
     gc_marks(objspace);
 
@@ -2417,6 +2423,7 @@
     RVALUE *p, *pend;
 
     if (objspace->heap.sweep_slots) {
+        while (heaps_increment(objspace));
         while (objspace->heap.sweep_slots) {
             scan = objspace->heap.sweep_slots;
             p = scan->slot; pend = p + scan->limit;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]