엔진/JVM
-
왜 Minor GC는 S0과 S1을 두고 사용하는가?엔진/JVM 2024. 4. 7. 18:53
매주 진행하고 있는 스터디의 이번 주 주제는 'JVM의 GC' 였습니다~ 잘 정리된 블로그 글을 읽다가 생긴 궁금증에 대한 내용을 적어봅니다. 아래의 글은 다음과 같은 순서로 작성되었습니다. 1. Heap의 사용 2. 왜 S0과 S1을 구분하는가 1. JVM에서 Heap의 사용 1. Heap의 공간 구분 JVM은 Heap을 크게 Young과 Old로 공간을 나눠서 구분하고, Young을 다시 Eden과 S0, S1의 형태로 나눠서 메모리를 관리합니다. 2. 공간 구분의 기준? Heap을 설계할 때 아래의 2가지를 전제로 두고 만들어졌습니다. (Genertaional Hypothesis) 1. 대부분의 객체는 금방 접근 불가능한 상태가된다. (Weak Generational Hypothesis) 대부분의 ..