[K/N] custom-alloc: Encode consecutive free blocks ^KT-55364

Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-662
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
This commit is contained in:
Troels Bjerre Lund
2023-05-10 09:45:14 +00:00
committed by Space Cloud
parent 7585a406e4
commit 388634e47d
20 changed files with 173 additions and 68 deletions
@@ -35,6 +35,7 @@ using string_view = std::experimental::string_view;
*/
extern "C" const int32_t Kotlin_needDebugInfo;
extern "C" const int32_t Kotlin_runtimeAssertsMode;
extern "C" const int32_t Kotlin_disableMmap;
extern "C" const char* const Kotlin_runtimeLogs;
extern "C" const int32_t Kotlin_gcSchedulerType;
extern "C" const int32_t Kotlin_freezingEnabled;
@@ -90,6 +91,10 @@ ALWAYS_INLINE inline bool runtimeAssertsEnabled() noexcept {
return runtimeAssertsMode() != RuntimeAssertsMode::kIgnore;
}
ALWAYS_INLINE inline bool disableMmap() noexcept {
return Kotlin_disableMmap != 0;
}
ALWAYS_INLINE inline std::string_view runtimeLogs() noexcept {
return Kotlin_runtimeLogs == nullptr ? std::string_view() : std::string_view(Kotlin_runtimeLogs);
}