I'd like to know what are the experiences with G1 garbage collector in newest JDK? I see NullPointerException
thrown in my program, although code didn't change and behave correctly in earlier JDKs.
G1 copies objects from one or more regions of the heap to a single region on the heap, and in the process both compacts and frees up memory. This evacuation is performed in parallel on multi-processors, to decrease pause times and increase throughput.
G1GC (Garbage First Garbage Collector) is the low latency garbage collection algorithm included in recent versions of both OpenJDK and Oracle Java. Like other Java GC algorithms, to reclaim heap space G1GC must halt all application threads, a process referred to as stopping-the-world (STW) or pausing (a GC pause).
The default garbage collector in Java 11 is the G1 garbage collector (G1GC). The aim of G1GC is to strike a balance between latency and throughput. The G1 garbage collector attempts to achieve high throughput by meeting pause time goals with high probability.
2) What is default garbage collector for Java 8 ? For server class machine (with at least 2 processors and at least 2 GB of physical memory) - The default garbage collector is the parallel collector.
A garbage collector will only impact the performance of your application, not its correctness. I've been using it for Eclipse, just for fun, and seemed stable.
I would look elsewhere for the source of the exceptions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With