package snippet;
public class Snippet {
public static void main (String[] args) {
double[] n1 = new double[1000000];
double[] n2 = new double[1000000];
long free = Runtime.getRuntime().freeMemory();
long total = Runtime.getRuntime().totalMemory();
long max = Runtime.getRuntime().maxMemory();
System.out.format("Total Memory : %6.2f MB%n", (double) total / (1024 * 1024));
System.out.format("Free Memory : %6.2f MB%n", (double) free / (1024 * 1024));
System.out.format("Max Memory : %6.2f MB%n", (double) max / (1024 * 1024));
}
}
'java' 카테고리의 다른 글
자바에서 os 값들 가지고오기 (0) | 2016.01.05 |
---|---|
final (0) | 2015.08.11 |
자바 쉽게 업데이트 (0) | 2015.07.22 |
이클립스 전체폴더 키워드 찾기 (0) | 2015.07.10 |
이클립스 여러줄 제어 단축키 (0) | 2015.07.09 |