diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-11-05 12:28:50 -0800 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-11-05 12:28:50 -0800 |
commit | 6d17c9fa5d6c578dd53e431c3fb4f288cce6248e (patch) | |
tree | d0381013635f9e680631b8518da9e4ad9ab104af | |
parent | d8da5c198348eac3d3d7a3e13dfb8a9351ed07ae (diff) |
gc_rest can change the total pages, so we need to do that first
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8520,8 +8520,6 @@ gc_sort_heap_by_empty_slots(rb_objspace_t *objspace) 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 RB_VM_LOCK_ENTER(); { + gc_rest(objspace); + if (RTEST(double_heap)) { heap_add_pages(objspace, heap_eden, heap_allocated_pages); } |