Merge pull request #3403 from ntherning/fix-handler-block-trampoline-crash-on-win64
[mono.git] / mono / metadata / boehm-gc.c
index 43844ad98304cfed42194dc622df44a161fe27ab..41510b486e88139695f0f0109332effe0b59557f 100644 (file)
@@ -829,6 +829,11 @@ mono_gc_clear_domain (MonoDomain *domain)
 {
 }
 
+void
+mono_gc_suspend_finalizers (void)
+{
+}
+
 int
 mono_gc_get_suspend_signal (void)
 {
@@ -1125,7 +1130,9 @@ mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box, gboolean know
                return NULL;
        if (!SMALL_ENOUGH (klass->instance_size))
                return NULL;
-       if (mono_class_has_finalizer (klass) || mono_class_is_marshalbyref (klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
+       if (mono_class_has_finalizer (klass) || mono_class_is_marshalbyref (klass))
+               return NULL;
+       if (mono_profiler_get_events () & (MONO_PROFILE_ALLOCATIONS | MONO_PROFILE_STATISTICAL))
                return NULL;
        if (klass->rank)
                return NULL;
@@ -1151,7 +1158,7 @@ mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box, gboolean know
                        atype = ATYPE_NORMAL;
                */
        }
-       return mono_gc_get_managed_allocator_by_type (atype, FALSE);
+       return mono_gc_get_managed_allocator_by_type (atype, MANAGED_ALLOCATOR_REGULAR);
 }
 
 MonoMethod*
@@ -1166,10 +1173,11 @@ mono_gc_get_managed_array_allocator (MonoClass *klass)
  *   Return a managed allocator method corresponding to allocator type ATYPE.
  */
 MonoMethod*
-mono_gc_get_managed_allocator_by_type (int atype, gboolean slowpath)
+mono_gc_get_managed_allocator_by_type (int atype, ManagedAllocatorVariant variant)
 {
        int offset = -1;
        MonoMethod *res;
+       gboolean slowpath = variant != MANAGED_ALLOCATOR_REGULAR;
        MonoMethod **cache = slowpath ? slowpath_alloc_method_cache : alloc_method_cache;
        MONO_THREAD_VAR_OFFSET (GC_thread_tls, offset);
 
@@ -1226,7 +1234,7 @@ mono_gc_get_managed_array_allocator (MonoClass *klass)
 }
 
 MonoMethod*
-mono_gc_get_managed_allocator_by_type (int atype, gboolean slowpath)
+mono_gc_get_managed_allocator_by_type (int atype, ManagedAllocatorVariant variant)
 {
        return NULL;
 }