X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fsgen-descriptors.cs;h=16f9dd305b98c311ccd3981381f4652df5b8e687;hb=32a5d1fc3bfd38c5ae596d672d73755b152aa401;hp=246e5aac59d9f18e6c73202dc30b7c7ba5ec3e1c;hpb=2a4a45902114498c57108cab2515958ca3598cef;p=mono.git diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs index 246e5aac59d..16f9dd305b9 100644 --- a/mono/tests/sgen-descriptors.cs +++ b/mono/tests/sgen-descriptors.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Runtime.InteropServices; public struct SmallMixed @@ -88,11 +89,26 @@ class Driver { } } + static unsafe void FillPtr (int cycles) { + var l = new List (); + 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); } } }