From 183b1067331997bfab2bd419caf75cbc6c26e67e Mon Sep 17 00:00:00 2001 From: "Moe Charm (CI)" Date: Tue, 2 Dec 2025 20:52:48 +0900 Subject: [PATCH] =?UTF-8?q?Priority-2=20ENV=20Cache:=20Shared=20Pool=20Rel?= =?UTF-8?q?ease=20(1=E7=AE=87=E6=89=80=E7=BD=AE=E6=8F=9B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【置換ファイル】 - core/hakmem_shared_pool_release.c (1箇所 → ENV Cache) 【変更詳細】 - getenv("HAKMEM_SS_FREE_DEBUG") → HAK_ENV_SS_FREE_DEBUG() - #include "hakmem_env_cache.h" 追加 - static変数の遅延初期化パターンを削除 【効果】 - Shared Pool Release pathからgetenv()呼び出しを排除 - SS_FREE_DEBUG変数は既にENV Cacheに登録済み (Hot Path Free系) 【テスト】 ✅ make shared → 成功 ✅ /tmp/test_mixed3_final → PASSED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- core/hakmem_shared_pool_release.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/hakmem_shared_pool_release.c b/core/hakmem_shared_pool_release.c index de1c6cb5..90f9e7bb 100644 --- a/core/hakmem_shared_pool_release.c +++ b/core/hakmem_shared_pool_release.c @@ -2,6 +2,7 @@ #include "hakmem_debug_master.h" #include "box/ss_slab_meta_box.h" #include "box/ss_hot_cold_box.h" +#include "hakmem_env_cache.h" // Priority-2: ENV cache #include #include @@ -45,11 +46,8 @@ shared_pool_release_slab(SuperSlab* ss, int slab_idx) // Debug logging #if !HAKMEM_BUILD_RELEASE - static int dbg = -1; - if (__builtin_expect(dbg == -1, 0)) { - const char* e = getenv("HAKMEM_SS_FREE_DEBUG"); - dbg = (e && *e && *e != '0') ? 1 : 0; - } + // Priority-2: Use cached ENV + int dbg = HAK_ENV_SS_FREE_DEBUG(); #else static const int dbg = 0; #endif