diff --git a/core/tiny_refill_opt.h b/core/tiny_refill_opt.h index 38fd5e76..3224d62a 100644 --- a/core/tiny_refill_opt.h +++ b/core/tiny_refill_opt.h @@ -82,6 +82,9 @@ static inline void trc_splice_to_sll(int class_idx, TinyRefillChain* c, } static inline int trc_refill_guard_enabled(void) { +#if HAKMEM_BUILD_RELEASE + return 0; // Always disabled in release builds +#else static int g_trc_guard = -1; if (__builtin_expect(g_trc_guard == -1, 0)) { const char* env = getenv("HAKMEM_TINY_REFILL_FAILFAST"); @@ -90,6 +93,7 @@ static inline int trc_refill_guard_enabled(void) { fflush(stderr); } return g_trc_guard; +#endif } static inline int trc_ptr_is_valid(uintptr_t base, uintptr_t limit, size_t blk, const void* node) {