search
Homephp教程PHP开发Garbage collector in JVM

Garbage collector in JVM

Nov 22, 2016 pm 04:56 PM
jvm

Serial collector: A new generation single-threaded collector that uses a copy algorithm for recycling. While it's garbage collecting, all threads from other users will be paused.

Serial Old Collector: The old generation version of Serial uses the mark-clear algorithm and is also a single-threaded collector.

ParNew collector: ParNew collector is actually a multi-threaded version of Serial. Except for multi-threaded garbage collection, the rest including collection algorithm (copy algorithm), object allocation rules, recycling strategy, etc. are exactly the same as Serial collector.

Parallel Scavenge collector: It is a new generation collector that uses a copy algorithm and is a parallel multi-threaded collector. This collector is designed to improve the throughput of the system (time to run user code/(running time) User code time + garbage collection time)), so the Parallel Scavenger collector is also called the "throughput first" collector.

Parallel Old Collector: It is the old generation version of Parallel Scavenge Collector, using the ‘mark-clear’ algorithm.

CMS Collector: Pays special attention to the response speed of user services, and hopes that the system pause time will be the shortest to provide users with a better experience. Concurrent collection, low pause. Instead, a ‘mark-and-sweep’ algorithm is used.

G1 collector: one of the most cutting-edge technologies in the development of current collector technology

Parallel and concurrent methods;


The generational collection used can manage the entire GC heap independently without cooperating with other collectors;


Spatial integration: On the whole, G1 uses a 'mark-organize' algorithm, but partially it is based on a 'copy' algorithm. But in any case, both algorithms mean that the G1 algorithm will not generate memory space fragmentation, and can provide regular available memory after collection.


Operation steps: initial marking; concurrent marking; final marking; screening and recycling.

Remarks:

Concurrency: The garbage collection thread can be executed at the same time as the user thread

Parallel: There can be multiple garbage collection threads, but the user thread at this time is still in a waiting state.


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.