projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
New test.
[mono.git]
/
samples
/
size
/
sample.cs
1
using System;
2
using Mono.ObjectServices;
3
4
class Demo {
5
int a;
6
static void Main ()
7
{
8
Demo d = new Demo ();
9
10
prints ("d", d);
11
prints ("dd", new DD ());
12
}
13
14
static void prints (string s, object x)
15
{
16
Console.WriteLine ("size of " + s + ":" + ObjectInspector.GetMemoryUsage (x));
17
}
18
}
19
20
class DD {
21
Demo d = new Demo ();
22
object [] o = new object [10];
23
24
public DD ()
25
{
26
o [0] = new Demo ();
27
o [5] = new Demo ();
28
}
29
}