diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | gc.c | 7 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,14 @@ +Fri Aug 12 13:53:03 2011 Narihiro Nakamura <narihiro@netlab.jp> + + * 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@segment7.net> * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel @@ -2172,6 +2172,12 @@ gc_lazy_sweep(rb_objspace_t *objspace) } after_gc_sweep(objspace); } + else { + if (heaps_increment(objspace)) { + during_gc = 0; + return TRUE; + } + } gc_marks(objspace); @@ -2417,6 +2423,7 @@ gc_clear_mark_on_sweep_slots(rb_objspace_t *objspace) 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; |