jvm 3 areas
1,young generation New new object 2,old generation Objects that have been used for a long time 3,permanent generation Information such as Class, method, etc.
Setting JVM memory parameters
How GC works 1,ScanVengeGC Target: young generation only Speed: fast Frequency: Frequent How it works: Copy only the object in use to survivor1 (to) without Survivor0 (From) Empty Survivor0 (From). 2,FullGC Target: young generation and old generation Speed: slow Frequency: Not generally done Execution timing: Memory is not released when running ScaVenge GC If not executed, out of memory error will occur How it works: Mark obj in use ---> Delete unused parts ---> Move fragmented memory to continuous memory
test https://github.com/YanHengGo/java
Recommended Posts