Skip to content

‑Xcompactexplicitgc / ‑Xnocompactexplicitgc

Enables or disables full compaction each time System.gc() is called.

Compaction takes place on global garbage collections if you specify -Xcompactgc or if compaction triggers are met.

Syntax

Setting Action Default
-Xcompactexplicitgc Enable compaction yes
-Xnocompactexplicitgc Disable compaction

See also