CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-Xsoftrefthreshold

Sets the value used by the garbage collector to determine the number of garbage collections after which a soft reference is cleared if its referent has not been marked.

Syntax

    -Xsoftrefthreshold<value>

Default behavior

The default value is 32.

Explanation

A soft reference (where its referent is not marked) is cleared after a number of garbage collection cycles calculated as: <value> * (proportion of free heap space)

For example, if -Xsoftrefthreshold is set to 32, and the heap is 25% free, soft references are cleared after 8 garbage collection cycles.