JAVA
java동작 환경 메모리 상태
질주하는구
2015. 7. 3. 16:32
Runtime runtime = Runtime.getRuntime();
DecimalFormat format = new DecimalFormat("###,###,###.##");
long max = runtime.maxMemory();
long total = runtime.totalMemory();
long free = runtime.freeMemory();
System.out.println("=============================================");
System.out.println("=============================================");
System.out.println("Max : " + format.format(max));
System.out.println("Total : " + format.format(total));
System.out.println("Free : " + format.format(free));
java동작 환경의 메모리 사용량을 확인 할 수 있는 소스 입니다.
반응형