Priority-2 ENV Cache: Shared Pool Release (1箇所置換)
【置換ファイル】
- 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 <noreply@anthropic.com>
This commit is contained in:
@ -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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user