I want to use `mimalloc` memory manager - <https:/...
# kotlin-native
a
I want to use
mimalloc
memory manager - https://kotlinlang.org/docs/reference/whatsnew14.html How have I pass
-Xallocator=mimalloc
by gradle (kts) configuration? In kotlin-native source code I’ve found the 4 different ways and nothing works.
a
Have you tried using
freeCompilerArgs
option?
a
Copy code
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
...
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.freeCompilerArgs += "-Xallocator=mimalloc"
Copy code
$ ./gradlew build
...
* What went wrong:
Task with name 'compileKotlin' not found in root project 'kotlin-native'.
a
I meant something like described in this paragraph, but with other compiler flag.
a
it works, thank you!