[K/N] Enable extra option for mimalloc ^KT-53182

Merge-request: KT-MR-6952
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
Alexander Shabalin
2022-09-01 09:02:23 +00:00
committed by Space
parent 77ab69240e
commit 0734456a87
6 changed files with 26 additions and 1 deletions
@@ -27,6 +27,7 @@ RUNTIME_WEAK int32_t Kotlin_printToAndroidLogcat = 1;
#endif
// Keep it 0 even when the compiler defaults to 1: if the overriding mechanism breaks, keeping it disabled is safer.
RUNTIME_WEAK int32_t Kotlin_appStateTracking = 0;
RUNTIME_WEAK int32_t Kotlin_mimallocUseDefaultOptions = 1;
ALWAYS_INLINE compiler::DestroyRuntimeMode compiler::destroyRuntimeMode() noexcept {
return static_cast<compiler::DestroyRuntimeMode>(Kotlin_destroyRuntimeMode);
@@ -58,3 +59,7 @@ ALWAYS_INLINE int compiler::getSourceInfo(void* addr, SourceInfo *result, int re
return Kotlin_getSourceInfo_Function(addr, result, result_size);
}
}
ALWAYS_INLINE bool compiler::mimallocUseDefaultOptions() noexcept {
return Kotlin_mimallocUseDefaultOptions != 0;
}