Skip to content

Commit

Permalink
Ignore GC disabled in GC.start
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Oct 9, 2024
1 parent c69e9e0 commit fd33a1a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gc/mmtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,16 @@ void rb_gc_impl_shutdown_free_objects(void *objspace_ptr) { }
void
rb_gc_impl_start(void *objspace_ptr, bool full_mark, bool immediate_mark, bool immediate_sweep, bool compact)
{
bool enabled = mmtk_gc_enabled_p();
if (!enabled) {
mmtk_set_gc_enabled(true);
}

mmtk_handle_user_collection_request(rb_gc_get_ractor_newobj_cache());

if (!enabled) {
mmtk_set_gc_enabled(false);
}
}

bool
Expand Down

0 comments on commit fd33a1a

Please sign in to comment.