ruby-changes:63027
From: Peter <ko1@a...>
Date: Sun, 20 Sep 2020 23:14:04 +0900 (JST)
Subject: [ruby-changes:63027] b6d599d76e (master): Update heap_pages_himem after freeing pages
https://git.ruby-lang.org/ruby.git/commit/?id=b6d599d76e From b6d599d76ec85422bea16b63f105985cf08e04bd Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Wed, 26 Aug 2020 12:16:17 -0400 Subject: Update heap_pages_himem after freeing pages diff --git a/gc.c b/gc.c index 7f48f1d..aa63cdb 100644 --- a/gc.c +++ b/gc.c @@ -1769,6 +1769,12 @@ heap_pages_free_unused_pages(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L1769 j++; } } + + struct heap_page *hipage = heap_pages_sorted[heap_allocated_pages - 1]; + RVALUE *himem = hipage->start + hipage->total_slots; + GC_ASSERT(himem <= heap_pages_himem); + heap_pages_himem = himem; + GC_ASSERT(j == heap_allocated_pages); } } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/