diff --git a/core/box/free_local_box.d b/core/box/free_local_box.d index 8e0dfc50..c6beb26b 100644 --- a/core/box/free_local_box.d +++ b/core/box/free_local_box.d @@ -11,8 +11,9 @@ core/box/free_local_box.o: core/box/free_local_box.c \ core/box/tiny_next_ptr_box.h core/hakmem_tiny_config.h \ core/tiny_nextptr.h core/tiny_region_id.h core/tiny_box_geometry.h \ core/ptr_track.h core/hakmem_super_registry.h \ - core/hakmem_tiny_superslab.h core/box/ss_hot_cold_box.h \ - core/box/../superslab/superslab_types.h core/tiny_region_id.h + core/hakmem_tiny_superslab.h core/hakmem_tiny.h \ + core/box/ss_hot_cold_box.h core/box/../superslab/superslab_types.h \ + core/tiny_region_id.h core/box/free_local_box.h: core/hakmem_tiny_superslab.h: core/superslab/superslab_types.h: @@ -38,6 +39,7 @@ core/tiny_box_geometry.h: core/ptr_track.h: core/hakmem_super_registry.h: core/hakmem_tiny_superslab.h: +core/hakmem_tiny.h: core/box/ss_hot_cold_box.h: core/box/../superslab/superslab_types.h: core/tiny_region_id.h: diff --git a/core/box/front_gate_classifier.d b/core/box/front_gate_classifier.d index c694ea8b..f1e69da9 100644 --- a/core/box/front_gate_classifier.d +++ b/core/box/front_gate_classifier.d @@ -10,13 +10,13 @@ core/box/front_gate_classifier.o: core/box/front_gate_classifier.c \ core/box/../superslab/superslab_types.h \ core/box/../superslab/../tiny_box_geometry.h \ core/box/../tiny_debug_ring.h core/box/../tiny_remote.h \ - core/box/../hakmem_tiny_superslab.h \ + core/box/../hakmem_tiny.h core/box/../hakmem_trace.h \ + core/box/../hakmem_tiny_mini_mag.h core/box/../hakmem_tiny_superslab.h \ core/box/../superslab/superslab_inline.h \ core/box/../hakmem_build_flags.h core/box/../hakmem_internal.h \ core/box/../hakmem.h core/box/../hakmem_config.h \ core/box/../hakmem_features.h core/box/../hakmem_sys.h \ - core/box/../hakmem_whale.h core/box/../hakmem_tiny_config.h \ - core/box/../pool_tls_registry.h + core/box/../hakmem_whale.h core/box/../hakmem_tiny_config.h core/box/front_gate_classifier.h: core/box/../tiny_region_id.h: core/box/../hakmem_build_flags.h: @@ -33,6 +33,9 @@ core/box/../superslab/superslab_types.h: core/box/../superslab/../tiny_box_geometry.h: core/box/../tiny_debug_ring.h: core/box/../tiny_remote.h: +core/box/../hakmem_tiny.h: +core/box/../hakmem_trace.h: +core/box/../hakmem_tiny_mini_mag.h: core/box/../hakmem_tiny_superslab.h: core/box/../superslab/superslab_inline.h: core/box/../hakmem_build_flags.h: @@ -43,4 +46,3 @@ core/box/../hakmem_features.h: core/box/../hakmem_sys.h: core/box/../hakmem_whale.h: core/box/../hakmem_tiny_config.h: -core/box/../pool_tls_registry.h: diff --git a/core/box/unified_batch_box.d b/core/box/unified_batch_box.d index 76145b72..30cec073 100644 --- a/core/box/unified_batch_box.d +++ b/core/box/unified_batch_box.d @@ -15,10 +15,10 @@ core/box/unified_batch_box.o: core/box/unified_batch_box.c \ core/box/../box/../superslab/superslab_types.h \ core/box/../box/../superslab/../tiny_box_geometry.h \ core/box/../box/../tiny_debug_ring.h core/box/../box/../tiny_remote.h \ - core/box/../box/../hakmem_tiny_integrity.h \ core/box/../box/../hakmem_tiny.h core/box/../box/../hakmem_trace.h \ - core/box/../box/../hakmem_tiny_mini_mag.h core/box/../box/../ptr_track.h \ - core/box/../box/../ptr_trace.h \ + core/box/../box/../hakmem_tiny_mini_mag.h \ + core/box/../box/../hakmem_tiny_integrity.h \ + core/box/../box/../ptr_track.h core/box/../box/../ptr_trace.h \ core/box/../box/../box/tiny_next_ptr_box.h core/hakmem_tiny_config.h \ core/tiny_nextptr.h core/hakmem_build_flags.h core/tiny_region_id.h \ core/superslab/superslab_inline.h core/box/../box/../tiny_debug_ring.h \ @@ -44,10 +44,10 @@ core/box/../box/../superslab/superslab_types.h: core/box/../box/../superslab/../tiny_box_geometry.h: core/box/../box/../tiny_debug_ring.h: core/box/../box/../tiny_remote.h: -core/box/../box/../hakmem_tiny_integrity.h: core/box/../box/../hakmem_tiny.h: core/box/../box/../hakmem_trace.h: core/box/../box/../hakmem_tiny_mini_mag.h: +core/box/../box/../hakmem_tiny_integrity.h: core/box/../box/../ptr_track.h: core/box/../box/../ptr_trace.h: core/box/../box/../box/tiny_next_ptr_box.h: diff --git a/core/front/tiny_unified_cache.d b/core/front/tiny_unified_cache.d index ef268091..08f2103a 100644 --- a/core/front/tiny_unified_cache.d +++ b/core/front/tiny_unified_cache.d @@ -16,7 +16,8 @@ core/front/tiny_unified_cache.o: core/front/tiny_unified_cache.c \ core/hakmem_tiny_config.h core/tiny_nextptr.h core/hakmem_build_flags.h \ core/tiny_region_id.h core/tiny_box_geometry.h core/ptr_track.h \ core/hakmem_super_registry.h core/hakmem_tiny_superslab.h \ - core/superslab/superslab_inline.h core/front/../hakmem_tiny_superslab.h \ + core/superslab/superslab_inline.h core/hakmem_tiny.h core/hakmem_trace.h \ + core/hakmem_tiny_mini_mag.h core/front/../hakmem_tiny_superslab.h \ core/front/../superslab/superslab_inline.h \ core/front/../box/pagefault_telemetry_box.h core/front/tiny_unified_cache.h: @@ -47,6 +48,9 @@ core/ptr_track.h: core/hakmem_super_registry.h: core/hakmem_tiny_superslab.h: core/superslab/superslab_inline.h: +core/hakmem_tiny.h: +core/hakmem_trace.h: +core/hakmem_tiny_mini_mag.h: core/front/../hakmem_tiny_superslab.h: core/front/../superslab/superslab_inline.h: core/front/../box/pagefault_telemetry_box.h: diff --git a/core/hakmem_super_registry.h b/core/hakmem_super_registry.h index 9e065d52..d4db904f 100644 --- a/core/hakmem_super_registry.h +++ b/core/hakmem_super_registry.h @@ -119,12 +119,16 @@ static inline int hak_super_hash(uintptr_t base, int lg_size) { static inline SuperSlab* hak_super_lookup(void* ptr) { if (!g_super_reg_initialized) return NULL; +#if !HAKMEM_BUILD_RELEASE // Debug logging (ENV-gated) static __thread int s_dbg = -1; if (__builtin_expect(s_dbg == -1, 0)) { const char* e = getenv("HAKMEM_SUPER_LOOKUP_DEBUG"); s_dbg = (e && *e && *e != '0') ? 1 : 0; } +#else + static const int s_dbg = 0; +#endif // Try both 1MB and 2MB alignments (1MB first for Step 1 default) // ACE will use both sizes dynamically in Step 3 diff --git a/core/tiny_alloc_fast_push.d b/core/tiny_alloc_fast_push.d index cdb347fe..b1ce71c4 100644 --- a/core/tiny_alloc_fast_push.d +++ b/core/tiny_alloc_fast_push.d @@ -12,8 +12,8 @@ core/tiny_alloc_fast_push.o: core/tiny_alloc_fast_push.c \ core/box/../superslab/superslab_types.h \ core/box/../superslab/../tiny_box_geometry.h \ core/box/../tiny_debug_ring.h core/box/../tiny_remote.h \ - core/box/../hakmem_tiny_integrity.h core/box/../hakmem_tiny.h \ - core/box/../hakmem_trace.h core/box/../hakmem_tiny_mini_mag.h \ + core/box/../hakmem_tiny.h core/box/../hakmem_trace.h \ + core/box/../hakmem_tiny_mini_mag.h core/box/../hakmem_tiny_integrity.h \ core/box/../ptr_track.h core/box/../ptr_trace.h \ core/box/../box/tiny_next_ptr_box.h core/hakmem_tiny_config.h \ core/tiny_nextptr.h core/hakmem_build_flags.h core/tiny_region_id.h \ @@ -40,10 +40,10 @@ core/box/../superslab/superslab_types.h: core/box/../superslab/../tiny_box_geometry.h: core/box/../tiny_debug_ring.h: core/box/../tiny_remote.h: -core/box/../hakmem_tiny_integrity.h: core/box/../hakmem_tiny.h: core/box/../hakmem_trace.h: core/box/../hakmem_tiny_mini_mag.h: +core/box/../hakmem_tiny_integrity.h: core/box/../ptr_track.h: core/box/../ptr_trace.h: core/box/../box/tiny_next_ptr_box.h: diff --git a/hakmem.d b/hakmem.d index c18c4f5e..47aa4662 100644 --- a/hakmem.d +++ b/hakmem.d @@ -22,11 +22,11 @@ hakmem.o: core/hakmem.c core/hakmem.h core/hakmem_build_flags.h \ core/box/hak_kpi_util.inc.h core/box/hak_core_init.inc.h \ core/hakmem_phase7_config.h core/box/ss_hot_prewarm_box.h \ core/box/hak_alloc_api.inc.h core/box/../hakmem_tiny.h \ - core/box/../hakmem_smallmid.h core/box/../pool_tls.h \ - core/box/hak_free_api.inc.h core/hakmem_tiny_superslab.h \ - core/box/../tiny_free_fast_v2.inc.h core/box/../tiny_region_id.h \ - core/box/../hakmem_build_flags.h core/box/../hakmem_tiny_config.h \ - core/box/../box/tls_sll_box.h core/box/../box/../hakmem_tiny_config.h \ + core/box/../hakmem_smallmid.h core/box/hak_free_api.inc.h \ + core/hakmem_tiny_superslab.h core/box/../tiny_free_fast_v2.inc.h \ + core/box/../tiny_region_id.h core/box/../hakmem_build_flags.h \ + core/box/../hakmem_tiny_config.h core/box/../box/tls_sll_box.h \ + core/box/../box/../hakmem_tiny_config.h \ core/box/../box/../hakmem_build_flags.h core/box/../box/../tiny_remote.h \ core/box/../box/../tiny_region_id.h \ core/box/../box/../hakmem_tiny_integrity.h \ @@ -44,6 +44,8 @@ hakmem.o: core/hakmem.c core/hakmem.h core/hakmem_build_flags.h \ core/box/front_gate_classifier.h core/box/../front/malloc_tiny_fast.h \ core/box/../front/../hakmem_build_flags.h \ core/box/../front/../hakmem_tiny_config.h \ + core/box/../front/../superslab/superslab_inline.h \ + core/box/../front/../box/ss_slab_meta_box.h \ core/box/../front/tiny_unified_cache.h \ core/box/../front/../tiny_region_id.h core/box/../front/../hakmem_tiny.h core/hakmem.h: @@ -104,7 +106,6 @@ core/box/ss_hot_prewarm_box.h: core/box/hak_alloc_api.inc.h: core/box/../hakmem_tiny.h: core/box/../hakmem_smallmid.h: -core/box/../pool_tls.h: core/box/hak_free_api.inc.h: core/hakmem_tiny_superslab.h: core/box/../tiny_free_fast_v2.inc.h: @@ -138,6 +139,8 @@ core/box/front_gate_classifier.h: core/box/../front/malloc_tiny_fast.h: core/box/../front/../hakmem_build_flags.h: core/box/../front/../hakmem_tiny_config.h: +core/box/../front/../superslab/superslab_inline.h: +core/box/../front/../box/ss_slab_meta_box.h: core/box/../front/tiny_unified_cache.h: core/box/../front/../tiny_region_id.h: core/box/../front/../hakmem_tiny.h: diff --git a/hakmem_shared_pool.d b/hakmem_shared_pool.d index 9f798757..8d572a04 100644 --- a/hakmem_shared_pool.d +++ b/hakmem_shared_pool.d @@ -9,13 +9,13 @@ hakmem_shared_pool.o: core/hakmem_shared_pool.c core/hakmem_shared_pool.h \ core/box/../superslab/superslab_types.h core/box/slab_freelist_atomic.h \ core/box/tiny_next_ptr_box.h core/hakmem_tiny_config.h \ core/tiny_nextptr.h core/tiny_region_id.h core/tiny_box_geometry.h \ - core/ptr_track.h core/hakmem_super_registry.h core/box/ss_hot_cold_box.h \ - core/box/pagefault_telemetry_box.h core/box/tls_sll_drain_box.h \ - core/box/tls_sll_box.h core/box/../hakmem_tiny_config.h \ - core/box/../hakmem_build_flags.h core/box/../tiny_remote.h \ - core/box/../tiny_region_id.h core/box/../hakmem_tiny_integrity.h \ - core/box/../hakmem_tiny.h core/box/../hakmem_build_flags.h \ - core/box/../hakmem_trace.h core/box/../hakmem_tiny_mini_mag.h \ + core/ptr_track.h core/hakmem_super_registry.h core/hakmem_tiny.h \ + core/hakmem_trace.h core/hakmem_tiny_mini_mag.h \ + core/box/ss_hot_cold_box.h core/box/pagefault_telemetry_box.h \ + core/box/tls_sll_drain_box.h core/box/tls_sll_box.h \ + core/box/../hakmem_tiny_config.h core/box/../hakmem_build_flags.h \ + core/box/../tiny_remote.h core/box/../tiny_region_id.h \ + core/box/../hakmem_tiny_integrity.h core/box/../hakmem_tiny.h \ core/box/../ptr_track.h core/box/../ptr_trace.h \ core/box/../tiny_debug_ring.h core/box/../superslab/superslab_inline.h \ core/box/free_local_box.h core/hakmem_tiny_superslab.h \ @@ -43,6 +43,9 @@ core/tiny_region_id.h: core/tiny_box_geometry.h: core/ptr_track.h: core/hakmem_super_registry.h: +core/hakmem_tiny.h: +core/hakmem_trace.h: +core/hakmem_tiny_mini_mag.h: core/box/ss_hot_cold_box.h: core/box/pagefault_telemetry_box.h: core/box/tls_sll_drain_box.h: @@ -53,9 +56,6 @@ core/box/../tiny_remote.h: core/box/../tiny_region_id.h: core/box/../hakmem_tiny_integrity.h: core/box/../hakmem_tiny.h: -core/box/../hakmem_build_flags.h: -core/box/../hakmem_trace.h: -core/box/../hakmem_tiny_mini_mag.h: core/box/../ptr_track.h: core/box/../ptr_trace.h: core/box/../tiny_debug_ring.h: diff --git a/hakmem_smallmid.d b/hakmem_smallmid.d index 4bab52ea..fdc7cf3c 100644 --- a/hakmem_smallmid.d +++ b/hakmem_smallmid.d @@ -6,7 +6,8 @@ hakmem_smallmid.o: core/hakmem_smallmid.c core/hakmem_smallmid.h \ core/hakmem_tiny_superslab.h core/superslab/superslab_types.h \ core/hakmem_tiny_superslab_constants.h core/superslab/superslab_inline.h \ core/superslab/superslab_types.h core/superslab/../tiny_box_geometry.h \ - core/tiny_debug_ring.h core/tiny_remote.h + core/tiny_debug_ring.h core/tiny_remote.h core/hakmem_tiny.h \ + core/hakmem_trace.h core/hakmem_tiny_mini_mag.h core/hakmem_smallmid.h: core/hakmem_build_flags.h: core/hakmem_smallmid_superslab.h: @@ -24,3 +25,6 @@ core/superslab/superslab_types.h: core/superslab/../tiny_box_geometry.h: core/tiny_debug_ring.h: core/tiny_remote.h: +core/hakmem_tiny.h: +core/hakmem_trace.h: +core/hakmem_tiny_mini_mag.h: