diff --git a/core/tiny_region_id.h b/core/tiny_region_id.h index cdcd21d2..444275ec 100644 --- a/core/tiny_region_id.h +++ b/core/tiny_region_id.h @@ -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