From 679c82157320abfcf1be39bc898cd3f00184b32b Mon Sep 17 00:00:00 2001 From: "Moe Charm (CI)" Date: Fri, 28 Nov 2025 04:33:39 +0900 Subject: [PATCH] ENV Cleanup Step 14: Gate HAKMEM_TINY_HEAP_V2_DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gate the HeapV2 push debug logging behind #if !HAKMEM_BUILD_RELEASE: - HAKMEM_TINY_HEAP_V2_DEBUG: Controls magazine push event tracing - File: core/front/tiny_heap_v2.h:117-130 Wraps the ENV check and debug output that logs the first 5 push operations per size class for HeapV2 magazine diagnostics. Performance: 29.6M ops/s (within baseline range) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- core/front/tiny_heap_v2.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/front/tiny_heap_v2.h b/core/front/tiny_heap_v2.h index 42cca61f..43b5bee8 100644 --- a/core/front/tiny_heap_v2.h +++ b/core/front/tiny_heap_v2.h @@ -114,6 +114,7 @@ static inline int tiny_heap_v2_try_push(int class_idx, void* base) { mag->items[mag->top++] = base; // DEBUG: Log push events +#if !HAKMEM_BUILD_RELEASE static int g_push_dbg = -1; if (g_push_dbg == -1) { const char* e = getenv("HAKMEM_TINY_HEAP_V2_DEBUG"); @@ -126,6 +127,7 @@ static inline int tiny_heap_v2_try_push(int class_idx, void* base) { class_idx, g_push_count[class_idx]++, base, mag->top); } } +#endif return 1; // Success }