summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2021-06-08 10:45:18 -0400
committerPeter Zhu <peter@peterzhu.ca>2021-06-08 14:31:38 -0400
commit9f110ced578ec944f7f7cbe11ba3519a25adf714 (patch)
treecbc88c55f252e5b828871e0b85bd135a1db40433
parentf9e13cda0432d125d7c277b95249192df0c61163 (diff)
Add multi-heap support to gc_marks_wb_unprotected_objects
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4559
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 892449f126..c3157dbe2c 100644
--- a/gc.c
+++ b/gc.c
@@ -7877,11 +7877,11 @@ gc_marks_wb_unprotected_objects_in_plane(rb_objspace_t *objspace, intptr_t p, bi
}
static void
-gc_marks_wb_unprotected_objects(rb_objspace_t *objspace)
+gc_marks_wb_unprotected_objects(rb_objspace_t *objspace, rb_heap_t *heap)
{
struct heap_page *page = 0;
- list_for_each(&heap_eden->pages, page, page_node) {
+ list_for_each(&heap->pages, page, page_node) {
bits_t *mark_bits = page->mark_bits;
bits_t *wbun_bits = page->wb_unprotected_bits;
RVALUE *p = page->start;
@@ -7950,7 +7950,7 @@ gc_marks_finish(rb_objspace_t *objspace)
objspace->flags.during_incremental_marking = FALSE;
/* check children of all marked wb-unprotected objects */
- gc_marks_wb_unprotected_objects(objspace);
+ gc_marks_wb_unprotected_objects(objspace, heap_eden);
}
#endif /* GC_ENABLE_INCREMENTAL_MARK */