class->gc_descr = (gpointer)mono_gc_make_descr_for_string (bitmap, 2);
} else if (class->rank) {
mono_class_compute_gc_descriptor (class->element_class);
- if (!class->element_class->valuetype) {
+ if (MONO_TYPE_IS_REFERENCE (&class->element_class->byval_arg)) {
gsize abm = 1;
class->gc_descr = mono_gc_make_descr_for_array (class->byval_arg.type == MONO_TYPE_SZARRAY, &abm, 1, sizeof (gpointer));
/*printf ("new array descriptor: 0x%x for %s.%s\n", class->gc_descr,
using System;
+using System.Collections.Generic;
using System.Runtime.InteropServices;
public struct SmallMixed
}
}
+ static unsafe void FillPtr (int cycles) {
+ var l = new List<Byte*[]> ();
+ for (int i = 0; i < cycles; ++i)
+ {
+ var a = new Byte* [128];
+ for (int j = 0; j < a.Length; ++j)
+ a [j] = (Byte*) new IntPtr (j).ToPointer ();
+ if (i < 1000)
+ l.Add (a);
+ else
+ l [i % 1000] = a;
+ }
+ }
+
static void Main () {
int loops = 3;
int cycles = 200000;
for (int i = 0; i < loops; ++i) {
Fill (cycles);
+ FillPtr (cycles);
}
}
}