Skip to content

Commit

Permalink
Call initialize_collection before enabling GC (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Apr 24, 2024
1 parent 7de6269 commit d0a47eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,10 +807,6 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
#pragma GCC diagnostic pop
JL_GC_PROMISE_ROOTED(ct);
_finish_julia_init(rel, ptls, ct);

#ifdef MMTK_GC
mmtk_initialize_collection((void *)ptls);
#endif
}

void jl_init_heartbeat(void);
Expand Down Expand Up @@ -857,6 +853,9 @@ static NOINLINE void _finish_julia_init(JL_IMAGE_SEARCH rel, jl_ptls_t ptls, jl_

jl_init_heartbeat();

#ifdef MMTK_GC
mmtk_initialize_collection((void *)ptls);
#endif
jl_gc_enable(1);

if (jl_options.image_file && (!jl_generating_output() || jl_options.incremental) && jl_module_init_order) {
Expand Down

0 comments on commit d0a47eb

Please sign in to comment.