-/*
- * null-gc.c: GC implementation using malloc: will leak everything, just for testing.
+/**
+ * \file
+ * GC implementation using malloc: will leak everything, just for testing.
*
* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2011 Novell, Inc (http://www.novell.com)
void
mono_gc_base_init (void)
{
- MonoThreadInfoCallbacks cb;
- int dummy;
-
mono_counters_init ();
- memset (&cb, 0, sizeof (cb));
- /* TODO: This casts away an incompatible pointer type warning in the same
- manner that boehm-gc does it. This is probably worth investigating
- more carefully. */
- cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method;
+#ifndef HOST_WIN32
+ mono_w32handle_init ();
+#endif
- mono_threads_init (&cb, sizeof (MonoThreadInfo));
+ mono_thread_callbacks_init ();
+ mono_thread_info_init (sizeof (MonoThreadInfo));
- mono_thread_info_attach (&dummy);
+ mono_thread_info_attach ();
}
void
return TRUE;
}
-gboolean
-mono_gc_register_thread (void *baseptr)
-{
- return TRUE;
-}
-
int
mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data)
{
return TRUE;
}
-void
-mono_gc_enable_events (void)
-{
-}
-
-void
-mono_gc_enable_alloc_events (void)
-{
-}
-
int
mono_gc_register_root (char *start, size_t size, void *descr, MonoGCRootSource source, const char *msg)
{
return NULL;
}
+void*
+mono_gc_make_vector_descr (void)
+{
+ return NULL;
+}
+
void*
mono_gc_make_root_descr_all_refs (int numbits)
{
return FALSE;
}
+gpointer
+mono_gc_thread_attach (MonoThreadInfo* info)
+{
+ return info;
+}
+
+void
+mono_gc_thread_detach_with_lock (MonoThreadInfo *p)
+{
+}
+
+gboolean
+mono_gc_thread_in_critical_region (MonoThreadInfo *info)
+{
+ return FALSE;
+}
+
int
mono_gc_get_aligned_size_for_allocator (int size)
{
}
void
-mono_gc_wbarrier_value_copy_bitmap (gpointer _dest, gpointer _src, int size, unsigned bitmap)
+mono_gc_wbarrier_range_copy (gpointer _dest, gpointer _src, int size)
{
g_assert_not_reached ();
}
+void*
+mono_gc_get_range_copy_func (void)
+{
+ return &mono_gc_wbarrier_range_copy;
+}
+
guint8*
mono_gc_get_card_table (int *shift_bits, gpointer *card_mask)
{
return NULL;
}
-void
-mono_gc_set_current_thread_appdomain (MonoDomain *domain)
-{
-}
-
gboolean
mono_gc_precise_stack_mark_enabled (void)
{
return NULL;
}
+void
+mono_gc_params_set (const char* options)
+{
+}
+
+void
+mono_gc_debug_set (const char* options)
+{
+}
+
void
mono_gc_conservatively_scan_area (void *start, void *end)
{
return TRUE;
}
#else
- #ifdef _MSC_VER
- // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
- void __mono_win32_null_gc_quiet_lnk4221(void) {}
- #endif
+
+MONO_EMPTY_SOURCE_FILE (null_gc);
#endif /* HAVE_NULL_GC */