검색결과 리스트
heap에 해당되는 글 2건
- 2014.01.21 [IntelliJ IDEA] IntelliJ Heap Size
- 2012.12.26 [java] Heap Memory Size 구하기
글
힙사이즈 조절
$cp /Applications/IntelliJ IDEA 13.app/bin/idea.vmoptions ~/Library/Preferences/IntelliJIDEA13/idea.vmoptions
$vi ~/Library/Preferences/IntelliJIdea13/idea.vmoptions
-Xms2048m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=128m
-XX:+UseCompressedOops
'IDE/Tool > IntelliJ IDEA' 카테고리의 다른 글
[IntelliJ IDEA] Tomcat JRE 변경하기 (0) | 2014.03.19 |
---|---|
[IntelliJ IDEA] idea.vmoptions 메모리 설정 (0) | 2014.03.18 |
[IntelliJ IDEA] intelliJ IDEA12 JRE 1.6 -> 1.7 변경 방법 (0) | 2013.11.26 |
[IntelliJ IDEA] Live Templates (0) | 2013.11.05 |
[IntelliJ IDEA] Unit Test (0) | 2013.11.04 |
트랙백
댓글
글
링크 : http://viralpatel.net/blogs/getting-jvm-heap-size-used-memory-total-memory-using-java-runtime/
/**
* Class: TestMemory
* @author: Viral Patel
* @description: Prints JVM memory utilization statistics
*/
public class TestMemory {
public static void main(String [] args) {
int mb = 1024*1024;
//Getting the runtime reference from system
Runtime runtime = Runtime.getRuntime();
System.out.println("##### Heap utilization statistics [MB] #####");
//Print used memory
System.out.println("Used Memory:"
+ (runtime.totalMemory() - runtime.freeMemory()) / mb);
//Print free memory
System.out.println("Free Memory:"
+ runtime.freeMemory() / mb);
//Print total available memory
System.out.println("Total Memory:" + runtime.totalMemory() / mb);
//Print Maximum available memory
System.out.println("Max Memory:" + runtime.maxMemory() / mb);
}
}
'Java > Java' 카테고리의 다른 글
[Java] JConsole 연결 옵션 (0) | 2013.01.05 |
---|---|
[Java] Java 모니터링 툴 VisualVM Download (0) | 2012.12.28 |
[Java] ClassLoader를 이용해서 서버이름 구하기 (0) | 2012.12.26 |
[Java] Java Profiler 자바 프로파일링 도구 (0) | 2012.12.23 |
[Java] System 환경 변수 읽어오기 (0) | 2012.12.13 |
RECENT COMMENT