corda/classpath/TestGC.java
Joel Dice 38cea04322 progress towards thread support
This includes support for using the least significant bits of the class
pointer to indicate object state, which we'll use to indicate the
presence of a monitor pointer, among other things.
2007-07-01 15:34:22 -06:00

31 lines
554 B
Java

public class TestGC {
private static void small() {
for (int i = 0; i < 1024; ++i) {
byte[] a = new byte[4 * 1024];
}
}
private static void medium() {
for (int i = 0; i < 8; ++i) {
Object[] array = new Object[32];
for (int j = 0; j < 32; ++j) {
array[j] = new byte[32 * 1024];
}
}
}
private static void large() {
for (int i = 0; i < 8; ++i) {
byte[] a = new byte[16 * 1024 * 1024];
}
}
public static void main(String[] args) {
small();
medium();
large();
}
}