mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_GC, msg, (unsigned long)arg);
}
+static void on_gc_notification (GC_EventType event);
+static void on_gc_heap_resize (size_t new_size);
+
void
mono_gc_base_init (void)
{
mono_thread_info_attach (&dummy);
- mono_gc_enable_events ();
+ GC_set_on_collection_event (on_gc_notification);
+ GC_on_heap_resize = on_gc_heap_resize;
MONO_GC_REGISTER_ROOT_FIXED (gc_handles [HANDLE_NORMAL].entries, MONO_ROOT_SOURCE_GC_HANDLE, "gc handles table");
MONO_GC_REGISTER_ROOT_FIXED (gc_handles [HANDLE_PINNED].entries, MONO_ROOT_SOURCE_GC_HANDLE, "gc handles table");
mono_profiler_gc_heap_resize (new_size);
}
-void
-mono_gc_enable_events (void)
-{
- GC_set_on_collection_event (on_gc_notification);
- GC_on_heap_resize = on_gc_heap_resize;
-}
-
-static gboolean alloc_events = FALSE;
-
-void
-mono_gc_enable_alloc_events (void)
-{
- alloc_events = TRUE;
-}
-
int
mono_gc_register_root (char *start, size_t size, void *descr, MonoGCRootSource source, const char *msg)
{
obj->vtable = vtable;
}
- if (G_UNLIKELY (alloc_events))
+ if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_ALLOCATIONS))
mono_profiler_allocation (obj);
return obj;
obj->max_length = max_length;
- if (G_UNLIKELY (alloc_events))
+ if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_ALLOCATIONS))
mono_profiler_allocation (&obj->obj);
return obj;
if (bounds_size)
obj->bounds = (MonoArrayBounds *) ((char *) obj + size - bounds_size);
- if (G_UNLIKELY (alloc_events))
+ if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_ALLOCATIONS))
mono_profiler_allocation (&obj->obj);
return obj;
obj->length = len;
obj->chars [len] = 0;
- if (G_UNLIKELY (alloc_events))
+ if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_ALLOCATIONS))
mono_profiler_allocation (&obj->object);
return obj;
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)
{
}
#else
- #ifdef _MSC_VER
- // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
- void __mono_win32_boehm_gc_quiet_lnk4221(void) {}
- #endif
+
+#ifdef _MSC_VER
+// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
+void __mono_win32_boehm_gc_quiet_lnk4221(void) {}
+#endif
#endif /* no Boehm GC */