diff --git a/core/tiny_alloc_fast.inc.h b/core/tiny_alloc_fast.inc.h index 92e590cc..2f9f09a6 100644 --- a/core/tiny_alloc_fast.inc.h +++ b/core/tiny_alloc_fast.inc.h @@ -22,10 +22,23 @@ #include "tiny_adaptive_sizing.h" // Phase 2b: Adaptive sizing #include "box/tls_sll_box.h" // Box TLS-SLL: C7-safe push/pop/splice #include "box/tiny_next_ptr_box.h" // Box API: Next pointer read/write +#include "box/tiny_front_config_box.h" // Phase 7-Step3: Compile-time config for dead code elimination #ifdef HAKMEM_TINY_FRONT_GATE_BOX #include "box/front_gate_box.h" #endif #include "hakmem_tiny_integrity.h" // PRIORITY 1-4: Corruption detection + +// Phase 7-Step3: Config wrapper functions (for normal mode, eliminated in PGO mode) +// These functions wrap global enable flags for dead code elimination in PGO builds +static inline int tiny_fastcache_enabled(void) { + extern int g_fastcache_enable; + return g_fastcache_enable; +} + +static inline int sfc_cascade_enabled(void) { + extern int g_sfc_enabled; + return g_sfc_enabled; +} #ifdef HAKMEM_TINY_HEADER_CLASSIDX // Ring Cache and Unified Cache removed (A/B test: OFF is faster) #endif