Skip to content

Commit d0a47eb

Browse files
authored
Call initialize_collection before enabling GC (#44)
1 parent 7de6269 commit d0a47eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,10 +807,6 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
807807
#pragma GCC diagnostic pop
808808
JL_GC_PROMISE_ROOTED(ct);
809809
_finish_julia_init(rel, ptls, ct);
810-
811-
#ifdef MMTK_GC
812-
mmtk_initialize_collection((void *)ptls);
813-
#endif
814810
}
815811

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

858854
jl_init_heartbeat();
859855

856+
#ifdef MMTK_GC
857+
mmtk_initialize_collection((void *)ptls);
858+
#endif
860859
jl_gc_enable(1);
861860

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

0 commit comments

Comments
 (0)