targetHeapBytes property

Long targetHeapBytes
getter/setter pair

Total amount of heap available for Kotlin objects.

The GC tries to schedule execution so that Kotlin heap doesn't overflow this heap.

Automatically adjusts when autotune is true: after each collection the targetHeapBytes is set to heapBytes / targetHeapUtilization and capped between minHeapBytes and maxHeapBytes, where heapBytes is heap usage after the garbage is collected.

Note, that if after a collection heapBytes > targetHeapBytes (which may happen if autotune is false, or maxHeapBytes is set too low), the next collection will be triggered almost immediately.

Implementation

external Long targetHeapBytes;