Remove unused Mid MT layer

This commit is contained in:
Moe Charm (CI)
2025-12-01 23:43:44 +09:00
parent 195c74756c
commit f1b7964ef9
8 changed files with 5 additions and 880 deletions

View File

@ -106,14 +106,6 @@ inline void* hak_alloc_at(size_t size, hak_callsite_t site) {
hkm_size_hist_record(size);
// Legacy Mid MT allocator (Phase 5) is disabled by default to favor ACE/Pool.
// Enable via HAKMEM_MID_MT_ENABLE=1 when running legacy benchmarks.
static int g_mid_mt_enabled = -1;
if (__builtin_expect(g_mid_mt_enabled < 0, 0)) {
const char* e = getenv("HAKMEM_MID_MT_ENABLE");
g_mid_mt_enabled = (e && *e && *e != '0') ? 1 : 0;
}
#ifdef HAKMEM_POOL_TLS_PHASE1
// Phase 1: Ultra-fast Pool TLS for 8KB-52KB range
if (size >= 8192 && size <= 53248) {
@ -124,18 +116,6 @@ inline void* hak_alloc_at(size_t size, hak_callsite_t site) {
}
#endif
if (__builtin_expect(g_mid_mt_enabled && mid_is_in_range(size), 0)) {
#if HAKMEM_DEBUG_TIMING
HKM_TIME_START(t_mid);
#endif
void* mid_ptr = mid_mt_alloc(size);
#if HAKMEM_DEBUG_TIMING
HKM_TIME_END(HKM_CAT_POOL_GET, t_mid);
#endif
// PERF_OPT: likely hint - mid allocations usually succeed
if (__builtin_expect(mid_ptr != NULL, 1)) return mid_ptr;
}
#if HAKMEM_FEATURE_EVOLUTION
if (g_evo_sample_mask > 0) {
static _Atomic uint64_t tick_counter = 0;