1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Skip repeated scan of object during compaction

This commit is contained in:
Peter Zhu 2020-12-03 14:09:18 -05:00 committed by Aaron Patterson
parent 04b96fc322
commit 88bb1a672c
Notes: git 2020-12-04 04:58:38 +09:00

2
gc.c
View file

@ -4484,7 +4484,7 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page,
objspace->rcompactor.total_moved++; objspace->rcompactor.total_moved++;
gc_move(objspace, (VALUE)p, dest); gc_move(objspace, (VALUE)p, dest);
gc_pin(objspace, (VALUE)p); gc_pin(objspace, (VALUE)p);
heap->compact_cursor_index = i; heap->compact_cursor_index = i + 1;
if (from_freelist) { if (from_freelist) {
FL_SET((VALUE)p, FL_FROM_FREELIST); FL_SET((VALUE)p, FL_FROM_FREELIST);
} }