[System] Tweak socket test
[mono-project.git] / mono / profiler / test-heapshot.cs
blobf0d537f764280e0224758acf0f923e27c3490b77
1 using System;
3 class T {
4 T next;
6 static void Main (string[] args) {
7 int count = 5000;
8 T list = null;
9 for (int i = 0; i < count; ++i) {
10 T n = new T ();
11 n.next = list;
12 list = n;
14 // trigger a heapshot
15 GC.Collect ();
16 for (int i = 0; i < 23; ++i) {
17 T n = new T ();
18 n.next = list;
19 list = n;
21 // trigger another heapshot
22 GC.Collect ();