}
if(threads==NULL) {
- MONO_GC_REGISTER_ROOT (threads);
+ MONO_GC_REGISTER_ROOT_FIXED (threads);
threads=mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_VALUE_GC);
}
if (!small_id_table) {
small_id_table_size = 2;
- small_id_table = mono_gc_alloc_fixed (small_id_table_size * sizeof (MonoInternalThread*), NULL);
+ small_id_table = mono_gc_alloc_fixed (small_id_table_size * sizeof (MonoInternalThread*), mono_gc_make_root_descr_all_refs (small_id_table_size));
}
for (i = small_id_next; i < small_id_table_size; ++i) {
if (!small_id_table [i]) {
if (new_size >= (1 << 16))
g_assert_not_reached ();
id = small_id_table_size;
- new_table = mono_gc_alloc_fixed (new_size * sizeof (MonoInternalThread*), NULL);
+ new_table = mono_gc_alloc_fixed (new_size * sizeof (MonoInternalThread*), mono_gc_make_root_descr_all_refs (new_size));
memcpy (new_table, small_id_table, small_id_table_size * sizeof (void*));
mono_gc_free_fixed (small_id_table);
small_id_table = new_table;
register_thread_start_argument (MonoThread *thread, struct StartInfo *start_info)
{
if (thread_start_args == NULL) {
- MONO_GC_REGISTER_ROOT (thread_start_args);
+ MONO_GC_REGISTER_ROOT_FIXED (thread_start_args);
thread_start_args = mono_g_hash_table_new (NULL, NULL);
}
mono_g_hash_table_insert (thread_start_args, thread, start_info->start_arg);
return NULL;
}
if (threads_starting_up == NULL) {
- MONO_GC_REGISTER_ROOT (threads_starting_up);
+ MONO_GC_REGISTER_ROOT_FIXED (threads_starting_up);
threads_starting_up = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_VALUE_GC);
}
mono_threads_lock ();
register_thread_start_argument (this, start_info);
if (threads_starting_up == NULL) {
- MONO_GC_REGISTER_ROOT (threads_starting_up);
+ MONO_GC_REGISTER_ROOT_FIXED (threads_starting_up);
threads_starting_up = mono_g_hash_table_new_type (NULL, NULL, MONO_HASH_KEY_VALUE_GC);
}
mono_g_hash_table_insert (threads_starting_up, this, this);
void mono_thread_init (MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb)
{
- MONO_GC_REGISTER_ROOT (small_id_table);
+ MONO_GC_REGISTER_ROOT_FIXED (small_id_table);
InitializeCriticalSection(&threads_mutex);
InitializeCriticalSection(&interlocked_mutex);
InitializeCriticalSection(&contexts_mutex);