RootSetStatistics

class RootSetStatistics(val threadLocalReferences: Long, val stackReferences: Long, val globalReferences: Long, val stableReferences: Long)(source)

This class represents statistics of the root set for garbage collector run, separated by root set pools. These nodes are assumed to be used, even if there are no references for them.

Since Kotlin

1.9

Constructors

Link copied to clipboard
constructor(threadLocalReferences: Long, stackReferences: Long, globalReferences: Long, stableReferences: Long)

Properties

Link copied to clipboard

The number of objects in global variables. The object is counted only if the variable is initialized.

Since Kotlin 1.9
Link copied to clipboard

The number of objects referenced by kotlinx.cinterop.StableRef. It includes both explicit usage of this API, and internal usages, e.g. inside interop and Worker API.

Since Kotlin 1.9
Link copied to clipboard

The number of objects referenced from the stack of any thread. These are function local variables and different temporary values, as function call arguments and return values. They would be automatically removed from the root set when a corresponding function call is finished.

Since Kotlin 1.9
Link copied to clipboard

The number of objects in global variables with @ThreadLocal annotation. Object is counted once per each thread it was initialized in.

Since Kotlin 1.9