1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update heap_pages_himem after freeing pages

This commit is contained in:
Peter Zhu 2020-08-26 12:16:17 -04:00 committed by Koichi Sasada
parent be2efb118f
commit b6d599d76e
Notes: git 2020-09-20 23:14:11 +09:00

6
gc.c
View file

@ -1769,6 +1769,12 @@ heap_pages_free_unused_pages(rb_objspace_t *objspace)
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);
}
}