Features of ZGC
Written from scratch, ZGC brings in a lot of features, which have been instrumental in its proposal, design, and implementation.
One of the most outstanding features of ZGC is that it is a concurrent GC. It can mark memory and copy and relocate it, all concurrently. It also has a concurrent reference processor. This essentially means that you can add all sort of references, such as weak references, soft references, phantom references, or finalizers (these are deprecated now). Even then, ZGC won't add more GC pauses for you (since it will clean or reclaim the memory concurrently).
As opposed to the store barriers that are used by another HotSpot GCs, ZGC uses load barriers. The load barriers are used to keep track of heap usage. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access