diff --git a/core/hakmem_super_registry.c b/core/hakmem_super_registry.c index 3557ae18..18500c25 100644 --- a/core/hakmem_super_registry.c +++ b/core/hakmem_super_registry.c @@ -562,12 +562,16 @@ void hak_ss_prewarm_class(int size_class, uint32_t count) { return; } +#if !HAKMEM_BUILD_RELEASE // Debug logging flag (lazy init) static int dbg = -1; if (__builtin_expect(dbg == -1, 0)) { const char* e = getenv("HAKMEM_SS_PREWARM_DEBUG"); dbg = (e && *e && *e != '0') ? 1 : 0; } +#else + static const int dbg = 0; +#endif // Ensure LRU cache is initialized if (!g_ss_lru_initialized) { @@ -641,12 +645,16 @@ void hak_ss_prewarm_all(const uint32_t counts[TINY_NUM_CLASSES]) { // Prewarm: Allocate SuperSlabs at startup and add to LRU cache void hak_ss_prewarm_init(void) { +#if !HAKMEM_BUILD_RELEASE // Debug logging flag (lazy init) static int dbg = -1; if (__builtin_expect(dbg == -1, 0)) { const char* e = getenv("HAKMEM_SS_PREWARM_DEBUG"); dbg = (e && *e && *e != '0') ? 1 : 0; } +#else + static const int dbg = 0; +#endif // Parse environment variable const char* env = getenv("HAKMEM_PREWARM_SUPERSLABS");