ENV Cleanup Step 4: Gate HAKMEM_WATCH_ADDR in tiny_region_id.h

Gate get_watch_addr() debug functionality with HAKMEM_BUILD_RELEASE,
returning 0 in release builds to disable address watching overhead.

Performance: 30.31M ops/s (baseline: 30.2M)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm (CI)
2025-11-28 00:47:16 +09:00
parent 42747a1080
commit 316ea4dfd6

View File

@ -56,6 +56,7 @@ static inline uint32_t watcher_self_u32(void) {
// Address watcher: Tracks when a specific address is allocated or freed
// Usage: HAKMEM_WATCH_ADDR=0x7f1234567890 ./program
static inline uintptr_t get_watch_addr(void) {
#if !HAKMEM_BUILD_RELEASE
static uintptr_t watch_addr = 0;
static int initialized = 0;
@ -77,6 +78,9 @@ static inline uintptr_t get_watch_addr(void) {
}
return watch_addr;
#else
return 0;
#endif
}
// Allocation source tracking