mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
31 lines
550 B
Java
31 lines
550 B
Java
public class GC {
|
|
|
|
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();
|
|
}
|
|
|
|
}
|