- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the changes in Memory Management in Java 9?
Garbage Collection or simply GC is the core part of Memory Management in Java. It can be responsible for cleaning dead objects from memory and reclaiming that space. GC executes cleanup using predefined Garbage Collectors that uses certain algorithms.
There are a few important types of Garbage Collectors listed below
- Serial GC: A single thread collector and applies to small applications with small data usage. It can be enabled by specifying the command-line option: -XX:+UseSerialGC.
- Parallel GC: Parallel GC uses multiple threads to perform the garbage collecting process, and it's also known as the throughput collector. It can be enabled by explicitly specifying the option: -XX:+UseParallelGC.
- G1 Garbage First: G1 (Garbage First) is the default garbage collector in Java 9. It can be designed for applications running on multi-processor machines with large memory space. It can be enabled with the option: -XX:+UseG1GC.
- Concurrent Mark Sweep: The application pause time is kept to a minimum. It can be used by specifying the option: -XX:+UseConcMarkSweepGC. As of Java 9, this GC type is deprecated.
Advertisements