2 using System.Collections.Generic;
3 using System.Reflection;
7 /*Test that GC handles interning failure correctly*/
8 static void DumpStuff () {
9 Console.WriteLine ("CWL under OOM - should not print {0}", 99);
10 Console.WriteLine ("CWL under OOM - should not print {0}{1}", 22, 44.4);
14 Console.WriteLine ("start");
15 Assembly corlib = typeof (object).Assembly;
16 Module module = corlib.GetModules ()[0];
17 var r = new Random (123456);
18 var l = new List<object> ();
20 for (int i = 0; i < 400000; ++i) {
21 var foo = new byte[r.Next () % 4000];
24 Console.WriteLine ("done");
30 } catch (Exception) {}
35 } catch (Exception) {}
40 } catch (Exception) {}
45 Console.WriteLine ("OOM done");