2007-07-01 15:34:22 -06:00
|
|
|
public class TestGC {
|
2007-06-20 19:37:43 -06:00
|
|
|
|
2007-06-22 17:17:13 -06:00
|
|
|
private static void small() {
|
2007-06-21 16:51:13 -06:00
|
|
|
for (int i = 0; i < 1024; ++i) {
|
|
|
|
byte[] a = new byte[4 * 1024];
|
|
|
|
}
|
2007-06-22 17:17:13 -06:00
|
|
|
}
|
2007-06-21 16:51:13 -06:00
|
|
|
|
2007-06-22 17:17:13 -06:00
|
|
|
private static void medium() {
|
2007-06-22 16:47:57 -06:00
|
|
|
for (int i = 0; i < 8; ++i) {
|
2007-06-21 16:51:13 -06:00
|
|
|
Object[] array = new Object[32];
|
|
|
|
for (int j = 0; j < 32; ++j) {
|
|
|
|
array[j] = new byte[32 * 1024];
|
|
|
|
}
|
2007-06-21 12:35:24 -06:00
|
|
|
}
|
2007-06-22 17:17:13 -06:00
|
|
|
}
|
2007-06-22 16:47:57 -06:00
|
|
|
|
2007-06-22 17:17:13 -06:00
|
|
|
private static void large() {
|
2007-06-22 16:47:57 -06:00
|
|
|
for (int i = 0; i < 8; ++i) {
|
|
|
|
byte[] a = new byte[16 * 1024 * 1024];
|
|
|
|
}
|
2007-06-20 19:37:43 -06:00
|
|
|
}
|
|
|
|
|
2007-06-22 17:17:13 -06:00
|
|
|
public static void main(String[] args) {
|
|
|
|
small();
|
|
|
|
medium();
|
|
|
|
large();
|
|
|
|
}
|
|
|
|
|
2007-06-20 19:37:43 -06:00
|
|
|
}
|