Skip to content

Commit

Permalink
Fix ephemeron-adoption problem found when upstreaming mark-delay to o…
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBarnes committed Nov 21, 2024
1 parent 1109768 commit 0323edf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/major_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,13 +1431,14 @@ void caml_mark_roots_stw (int participant_count, caml_domain_state** barrier_par
Caml_global_barrier_if_final(participant_count) {
caml_gc_phase = Phase_sweep_and_mark_main;
atomic_store_relaxed(&global_roots_scanned, WORK_UNSTARTED);
/* Adopt orphaned work from domains that were spawned and
terminated in the previous cycle. Do this in the barrier,
before any domain can terminate on this cycle. */
adopt_orphaned_work (caml_global_heap_state.UNMARKED);
}

caml_domain_state* domain = Caml_state;

/* Adopt orphaned work from domains that were spawned and terminated in the
previous cycle. */
adopt_orphaned_work (caml_global_heap_state.UNMARKED);

begin_ephe_marking();

Expand Down

0 comments on commit 0323edf

Please sign in to comment.