[前][次][番号順一覧][スレッド一覧]

ruby-changes:63531

From: Aaron <ko1@a...>
Date: Fri, 6 Nov 2020 05:29:06 +0900 (JST)
Subject: [ruby-changes:63531] 6d17c9fa5d (master): gc_rest can change the total pages, so we need to do that first

https://git.ruby-lang.org/ruby.git/commit/?id=6d17c9fa5d

From 6d17c9fa5d6c578dd53e431c3fb4f288cce6248e Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Thu, 5 Nov 2020 12:28:50 -0800
Subject: gc_rest can change the total pages, so we need to do that first


diff --git a/gc.c b/gc.c
index a5f99e5..a41160a 100644
--- a/gc.c
+++ b/gc.c
@@ -8520,8 +8520,6 @@ gc_sort_heap_by_empty_slots(rb_objspace_t *objspace) https://github.com/ruby/ruby/blob/trunk/gc.c#L8520
     struct heap_page *page = 0, **page_list = malloc(size);
     size_t i = 0;
 
-    gc_rest(objspace);
-
     list_for_each(&heap_eden->pages, page, page_node) {
         page_list[i++] = page;
         assert(page != NULL);
@@ -9256,6 +9254,8 @@ gc_verify_compaction_references(rb_execution_context_t *ec, VALUE self, VALUE do https://github.com/ruby/ruby/blob/trunk/gc.c#L9254
 
     RB_VM_LOCK_ENTER();
     {
+        gc_rest(objspace);
+
         if (RTEST(double_heap)) {
             heap_add_pages(objspace, heap_eden, heap_allocated_pages);
         }
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]