ruby-changes:63881
From: Peter <ko1@a...>
Date: Fri, 4 Dec 2020 04:58:29 +0900 (JST)
Subject: [ruby-changes:63881] 88bb1a672c (master): Skip repeated scan of object during compaction
https://git.ruby-lang.org/ruby.git/commit/?id=88bb1a672c From 88bb1a672c49746972f4b15410fa92e9d237c43d Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Thu, 3 Dec 2020 14:09:18 -0500 Subject: Skip repeated scan of object during compaction diff --git a/gc.c b/gc.c index 306ad0e..c5ba3e7 100644 --- a/gc.c +++ b/gc.c @@ -4484,7 +4484,7 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page, https://github.com/ruby/ruby/blob/trunk/gc.c#L4484 objspace->rcompactor.total_moved++; gc_move(objspace, (VALUE)p, dest); gc_pin(objspace, (VALUE)p); - heap->compact_cursor_index = i; + heap->compact_cursor_index = i + 1; if (from_freelist) { FL_SET((VALUE)p, FL_FROM_FREELIST); } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/