diff options
author | Peter Zhu <[email protected]> | 2024-08-26 10:59:30 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-08-26 13:25:12 -0400 |
commit | 1cafc9d51d3be36ab34e77b5c8f034b2daba231f (patch) | |
tree | 08099a20fe10532fbf49b9c61f0695c1b6139429 /gc/default.c | |
parent | 51aadefb4dd5c616103b831d18f13b7503f36fbc (diff) |
Use rb_gc_multi_ractor_p in gc/default.c
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11462
Diffstat (limited to 'gc/default.c')
-rw-r--r-- | gc/default.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gc/default.c b/gc/default.c index b82fdeffce..9038df3810 100644 --- a/gc/default.c +++ b/gc/default.c @@ -623,7 +623,6 @@ typedef struct rb_objspace { rb_postponed_job_handle_t finalize_deferred_pjob; unsigned long live_ractor_cache_count; - bool multi_ractor_p; } rb_objspace_t; #ifndef HEAP_PAGE_ALIGN_LOG @@ -5446,7 +5445,7 @@ gc_verify_internal_consistency_(rb_objspace_t *objspace) if (!is_lazy_sweeping(objspace) && !finalizing && - !objspace->multi_ractor_p) { + !rb_gc_multi_ractor_p()) { if (objspace_live_slots(objspace) != data.live_object_count) { fprintf(stderr, "heap_pages_final_slots: %"PRIdSIZE", total_freed_objects: %"PRIdSIZE"\n", total_final_slots_count(objspace), total_freed_objects(objspace)); @@ -6469,10 +6468,6 @@ rb_gc_impl_ractor_cache_alloc(void *objspace_ptr) objspace->live_ractor_cache_count++; - if (objspace->live_ractor_cache_count > 1) { - objspace->multi_ractor_p = true; - } - return calloc1(sizeof(rb_ractor_newobj_cache_t)); } |