diff --git a/core/tiny_debug.h b/core/tiny_debug.h index eff84f61..727e58ba 100644 --- a/core/tiny_debug.h +++ b/core/tiny_debug.h @@ -1,6 +1,8 @@ #ifndef TINY_DEBUG_H #define TINY_DEBUG_H +#if !HAKMEM_BUILD_RELEASE + #include #include #include @@ -49,4 +51,20 @@ static inline void tiny_alloc_dump_tls_state(int class_idx, const char* tag, Tin } } +#else // HAKMEM_BUILD_RELEASE + +// No-op stubs for release builds +static inline int tiny_alloc_debug_enabled(void) { + return 0; +} + +static inline void tiny_alloc_dump_tls_state(int class_idx, const char* tag, TinyTLSSlab* tls) { + (void)class_idx; + (void)tag; + (void)tls; + // No-op in release builds +} + +#endif // !HAKMEM_BUILD_RELEASE + #endif // TINY_DEBUG_H