diff --git a/core/hakmem_tiny_config.c b/core/hakmem_tiny_config.c index ecacfa12..1504220a 100644 --- a/core/hakmem_tiny_config.c +++ b/core/hakmem_tiny_config.c @@ -19,11 +19,11 @@ static const uint16_t k_fast_cap_defaults_factory[TINY_NUM_CLASSES] = { 128, // Class 4: 128B (trimmed via ACE/TLS caps) 128, // Class 5: 256B 128, // Class 6: 512B - 0 // Class 7: 1KB (bypass fast cache) + 64 // Class 7: 1KB (enable small fast cache to reduce Superslab path) }; uint16_t g_fast_cap_defaults[TINY_NUM_CLASSES] = { - 128, 128, 128, 128, 128, 128, 128, 0 + 128, 128, 128, 128, 128, 128, 128, 64 }; void tiny_config_reset_defaults(void) { diff --git a/core/tiny_remote.c b/core/tiny_remote.c index ffb04f94..0cc7e519 100644 --- a/core/tiny_remote.c +++ b/core/tiny_remote.c @@ -22,7 +22,7 @@ typedef struct { } rem_side_entry; static rem_side_entry g_rem_side[REM_SIDE_SIZE]; -int g_remote_side_enable = 1; // 強制有効化: ブロックメモリへのnext埋め込みを回避 +int g_remote_side_enable = 1; // default ON; can be disabled via env or 1T hint extern int g_debug_remote_guard; static _Atomic int g_remote_scribble_once = 0; static _Atomic uintptr_t g_remote_watch_ptr = 0; @@ -647,6 +647,12 @@ void tiny_remote_side_init_from_env(void) { if (side_env && *side_env) { enable = (atoi(side_env) != 0); } + // Optional: assume single-thread mode and disable side-table to reduce overhead + // Use HAKMEM_TINY_ASSUME_1T=1 to hint 1-thread operation (benchmarks). + const char* one_t = getenv("HAKMEM_TINY_ASSUME_1T"); + if (one_t && atoi(one_t) != 0) { + enable = 0; + } if (!enable && __builtin_expect(g_debug_remote_guard, 0)) { enable = 1; }