diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 06:10:56 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 06:10:56 +0000 |
commit | 53bdcbed86942f2ac6b1a3affcc187602d25cead (patch) | |
tree | f191d4cce16f9569263ed4fae1f800eac65a7be5 | |
parent | 3cd6fe32541d2d19a1084c2cb34de64814c14df5 (diff) |
revert last commit because it fails test-all.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 14 |
2 files changed, 6 insertions, 12 deletions
@@ -1,7 +1,3 @@ -Tue Jul 16 14:59:09 2013 Koichi Sasada <ko1@atdot.net> - - * gc.c (after_gc_sweep): refactoring code. - Tue Jul 16 13:32:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * encoding.c (enc_set_index): since r41967, old terminator is dealt @@ -2384,20 +2384,18 @@ after_gc_sweep(rb_objspace_t *objspace) static int lazy_sweep(rb_objspace_t *objspace) { - struct heaps_slot *slot; + struct heaps_slot *next; int result = FALSE; gc_prof_sweep_timer_start(objspace); heaps_increment(objspace); - slot = objspace->heap.sweep_slots; + while (is_lazy_sweeping(objspace)) { + next = objspace->heap.sweep_slots->next; + slot_sweep(objspace, objspace->heap.sweep_slots); + objspace->heap.sweep_slots = next; - while (slot) { - slot_sweep(objspace, slot); - - if ((objspace->heap.sweep_slots = slot = slot->next) == NULL) { - after_gc_sweep(objspace); - } + if (!next) after_gc_sweep(objspace); if (has_free_object) { result = TRUE; |