repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[profiler] Correct the profiler format.
[mono-project.git]
/
mono
/
profiler
/
test-heapshot.cs
blob
f0d537f764280e0224758acf0f923e27c3490b77
1
using
System
;
2
3
class
T
{
4
T next
;
5
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
;
13
}
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
;
20
}
21
// trigger another heapshot
22
GC
.
Collect
();
23
}
24
}
25