ruby-changes:20845
From: nari <ko1@a...>
Date: Tue, 9 Aug 2011 13:26:25 +0900 (JST)
Subject: [ruby-changes:20845] nari:r32894 (trunk): * gc.c (gc_lazy_sweep): if sweep target slots are not found, we
nari 2011-08-09 13:26:15 +0900 (Tue, 09 Aug 2011) New Revision: 32894 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32894 Log: * 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: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 32893) +++ ChangeLog (revision 32894) @@ -1,3 +1,12 @@ +Tue Aug 9 11:21:08 2011 Narihiro Nakamura <authornari@g...> + + * 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. + Tue Aug 9 12:20:33 2011 Naohisa Goto <ngotogenome@g...> * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added. Index: gc.c =================================================================== --- gc.c (revision 32893) +++ gc.c (revision 32894) @@ -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/