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 /gc.c | |
parent | 3cd6fe32541d2d19a1084c2cb34de64814c14df5 (diff) | |
download | ruby-53bdcbed86942f2ac6b1a3affcc187602d25cead.tar.gz |
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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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; |