:wave: Hey folks; I'm trying to understand what me...
# compiler
a
👋 Hey folks; I'm trying to understand what memory allocation parameter is used by the Kotlin Preloader? (
org.jetbrains.kotlin.preloading.Preloader
) The preloader java process seems to keep OOM-ing
Copy code
exception: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Addresses
File being compiled: (121,5) in /Users/andrewlouis/Documents/pluto-server/kotlin/app/build/generated/jooq/main/io/plutocard/jooq/`public`/tables/Addresses.kt
The root cause java.lang.OutOfMemoryError was thrown at: kotlin.collections.CollectionsKt__ReversedViewsKt.reverseElementIndex$CollectionsKt__ReversedViewsKt(ReversedViews.kt:65)
	at org.jetbrains.kotlin.resolve.ExceptionWrappingKtVisitorVoid.visitDeclaration(ExceptionWrappingKtVisitorVoid.kt:43)
u
If you mean the case when the compiler is run in CLI via
kotlinc
, then starting from Kotlin 1.9.20, it will be run with
-Xmx256M -Xms128M
, unless custom options are given in `JAVA_OPTS`: https://github.com/JetBrains/kotlin/blob/7620289f6f7151257acd3178a9f64cf4401adf07/compiler/cli/bin/kotlinc#L42 Before 1.9.20, it was run with
-Xmx256M -Xmx32M
by default: https://github.com/JetBrains/kotlin/blob/1.9.0/compiler/cli/bin/kotlinc#L42 (which led to OOM KT-58690)