mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
gc_rest can change the total pages, so we need to do that first
This commit is contained in:
parent
d8da5c1983
commit
6d17c9fa5d
1 changed files with 2 additions and 2 deletions
4
gc.c
4
gc.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue