Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sample.cs « size « samples - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5a874dec8528b5ecbc505f5e576e1800f10bf5e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Mono.ObjectServices;

class Demo {
    int a;
	static void Main ()
	{
		Demo d = new Demo ();

		prints ("d", d);
		prints ("dd", new DD ());
	}

	static void prints (string s, object x)
	{
		Console.WriteLine ("size of " + s + ":" + ObjectInspector.GetMemoryUsage (x));
	}
}

class DD {
    Demo d = new Demo ();
    object [] o = new object [10];
}