[K/N] Refactor allocator modules ^KT-60928
- Move std_alloc, opt_alloc and custom_alloc into alloc/std, alloc/mimalloc and alloc/custom to mirror convention of gc, gcScheduler modules. - Add alloc/common with common allocator API - Add alloc/legacy with common implementation details of alloc/std and alloc/mimalloc. alloc/custom does not depend on alloc/legacy. - Removes experimental_memory_manager_custom as it's now unused - Additionally, renames experimental_memory_manager module into mm
This commit is contained in:
committed by
Space Team
parent
c6893de9bb
commit
1fa0ef6f56
+5
-3
@@ -298,6 +298,8 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
||||
|
||||
internal val runtimeNativeLibraries: List<String> = mutableListOf<String>().apply {
|
||||
if (debug) add("debug.bc")
|
||||
add("mm.bc")
|
||||
add("common_alloc.bc")
|
||||
add("common_gc.bc")
|
||||
add("common_gcScheduler.bc")
|
||||
when (gcSchedulerType) {
|
||||
@@ -315,14 +317,12 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
||||
}
|
||||
}
|
||||
if (allocationMode == AllocationMode.CUSTOM) {
|
||||
add("experimental_memory_manager_custom.bc")
|
||||
when (gc) {
|
||||
GC.STOP_THE_WORLD_MARK_AND_SWEEP -> add("same_thread_ms_gc_custom.bc")
|
||||
GC.NOOP -> add("noop_gc_custom.bc")
|
||||
GC.PARALLEL_MARK_CONCURRENT_SWEEP -> add("concurrent_ms_gc_custom.bc")
|
||||
}
|
||||
} else {
|
||||
add("experimental_memory_manager.bc")
|
||||
when (gc) {
|
||||
GC.STOP_THE_WORLD_MARK_AND_SWEEP -> add("same_thread_ms_gc.bc")
|
||||
GC.NOOP -> add("noop_gc.bc")
|
||||
@@ -339,10 +339,12 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
|
||||
}
|
||||
when (allocationMode) {
|
||||
AllocationMode.MIMALLOC -> {
|
||||
add("opt_alloc.bc")
|
||||
add("legacy_alloc.bc")
|
||||
add("mimalloc_alloc.bc")
|
||||
add("mimalloc.bc")
|
||||
}
|
||||
AllocationMode.STD -> {
|
||||
add("legacy_alloc.bc")
|
||||
add("std_alloc.bc")
|
||||
}
|
||||
AllocationMode.CUSTOM -> {
|
||||
|
||||
Reference in New Issue
Block a user