RootSetStatistics

Native
1.9
@NativeRuntimeApi class RootSetStatistics
(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.

Constructors

Native
1.3

<init>

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.

RootSetStatistics(
    threadLocalReferences: Long,
    stackReferences: Long,
    globalReferences: Long,
    stableReferences: Long)

Properties

Native
1.3

globalReferences

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

val globalReferences: Long
Native
1.3

stableReferences

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.

val stableReferences: Long
Native
1.3

stackReferences

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.

val stackReferences: Long
Native
1.3

threadLocalReferences

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

val threadLocalReferences: Long