Does the ZGC garbage collector support string deduplication?

1.6k Views Asked by At

Since it is not listed as an option at https://wiki.openjdk.java.net/display/zgc/Main I assume it is not supported. Some tests code made me wonder if it is supported?

2

There are 2 best solutions below

0
On BEST ANSWER

As of this moment, it looks like ZGC will support string deduplication as of Java 18 (from the pre-release notes):

Build 11

ZGC supports string deduplication (JDK-8267186) hotspot/gc

The Z Garbage Collector now supports string deduplication (JEP 192).

2
On

Per Liden, the ZGC project lead, stated on 2020-04-02:

ZGC doesn't do String deduplication (yet).

Source