project/jvm/JVM垃圾回收.md

9 lines
531 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## GC范围
GC管理的主要区域是Java堆一般情况下只针对堆进行垃圾回收。方法区、栈和本地方法区不被GC所管理,因而选择这些区域内的对象的引用作为GC roots被GC roots引用的对象不被GC回收。
## 垃圾收集器
- 并行parallel多个垃圾收集线程并行工作此时用户线程处于等待状态。
- 并发concurrent用户线程和垃圾收集线程同时执行。
- 吞吐量:用户代码执行时间/(用户代码执行时间+垃圾收集时间)