projects
/
IRC.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
an appropriate test to simulate SOR for new pool allocation
[IRC.git]
/
Robust
/
src
/
Tests
/
oooJava
/
poolalloc
/
test.java
1
public class Foo {
2
public int z;
3
public Foo() {}
4
}
5
6
public class Test {
7
8
static public void main( String args[] ) {
9
10
int x = 12345;
11
12
for( int i = 0; i < 200000; ++i ) {
13
rblock a {
14
Foo f = new Foo();
15
f.z = 0;
16
++f.z;
17
}
18
rblock b {
19
--f.z;
20
}
21
int y = -1;
22
if( i % 2 == 0 ) {
23
rblock c {
24
y = 1;
25
}
26
}
27
x += f.z + y;
28
}
29
30
System.out.println( x );
31
}
32
}