Skip to content

Commit 16f0741

Browse files
committed
Avoid call to mono_gc_get_managed_allocator_types when running on IL2CPP runtime
1 parent 6e036ac commit 16f0741

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mono/metadata/profiler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,10 @@ mono_profiler_sampling_thread_wait (void)
559559
mono_bool
560560
mono_profiler_enable_allocations (void)
561561
{
562+
#ifndef RUNTIME_IL2CPP
562563
if (mono_gc_get_managed_allocator_types () > 0 && mono_profiler_state.startup_done)
563564
return FALSE;
565+
#endif
564566

565567
return mono_profiler_state.allocations = TRUE;
566568
}

0 commit comments

Comments
 (0)