Does the G1 Garbage Collector move memory during compaction?
Aleksey Shipilev
ashipile at redhat.com
Thu Sep 8 09:02:36 UTC 2016
On 09/08/2016 11:54 AM, Jon V. wrote:
> I found some information that says that G1 does have compaction phases but
> there isn’t any mention of it actually moves data during compaction or not
> or if it just operates on lists?
I can't figure what is compaction if it does not actually moves the
data. Collectors move data a lot. See e.g. JOL [1] examples for object
promotion [2], compaction [3], and defragmentation [4].
Thanks,
-Aleksey
[1] http://openjdk.java.net/projects/code-tools/jol/
[2]
http://hg.openjdk.java.net/code-tools/jol/file/07087260ce41/jol-samples/src/main/java/org/openjdk/jol/samples/JOLSample_19_Promotion.java
[3]
http://hg.openjdk.java.net/code-tools/jol/file/07087260ce41/jol-samples/src/main/java/org/openjdk/jol/samples/JOLSample_22_Compaction.java
[4]
http://hg.openjdk.java.net/code-tools/jol/file/07087260ce41/jol-samples/src/main/java/org/openjdk/jol/samples/JOLSample_23_Defragmentation.java
More information about the hotspot-dev
mailing list