MemoryUsage 클래스를 통해서 메모리에 대한 정보를 모니터링 해보면 아래의 결과를 볼수 있습니다.
USAGE(Code Cache) init = 163840(160K) used = 535168(522K) committed = 557056(544K) max = 33554432(32768K)
USAGE(Eden Space) init = 917504(896K) used = 807560(788K) committed = 917504(896K) max = 4194304(4096K)
USAGE(Survivor Space) init = 65536(64K) used = 0(0K) committed = 65536(64K) max = 458752(448K)
USAGE(Tenured Gen) init = 4194304(4096K) used = 0(0K) committed = 4194304(4096K) max = 61997056(60544K)
USAGE(Perm Gen) init = 12582912(12288K) used = 699408(683K) committed = 12582912(12288K) max = 67108864(65536K)
USAGE(Perm Gen [shared-ro]) init = 8388608(8192K) used = 5344032(5218K) committed = 8388608(8192K) max = 8388608(8192K)
USAGE(Perm Gen [shared-rw]) init = 12582912(12288K) used = 6771000(6612K) committed = 12582912(12288K) max = 12582912(12288K)
위 내용을 보면, 대략 7개의 메모리 영역이 있네요.. 메모리 영역에 대해서 찾아보니... 어느 성능관련 엔지니어님의 블로그에 아래와 같은 설명이 있네요. ^^
Code Cache: contains memory used for compilation and storage of native code
Eden Space: pool from which memory is initially allocated for most objects
Survivor Space: pool containing objects that have survived Eden space garbage collection
Tenured Gen: pool containing long-lived objects
Perm Gen: contains reflective data of the JVM itself, including class and memory objects
Perm Gen [shared-ro]: read-only reflective data
Perm Gen [shared-rw]: read-write reflective data
'Java' 카테고리의 다른 글
| 소켓 연결 확인하기.. (0) | 2010/03/03 |
|---|---|
| Object.hashCode() vs System.identityHashCode(Object x) (0) | 2010/02/01 |
| 자바 메모리 구조 (0) | 2010/01/27 |
| convert nanoseconds to seconds or milliseconds (0) | 2010/01/27 |
| Java vs C# Serialize 비교 또는 C# DataSet을 쓰지 말아야 되는 이유(?) (4) | 2010/01/15 |