|
|
0752688785
|
Phase REFACTOR-2: Legacy Fallback Logic Unification
Consolidate duplicated legacy free logic into a single reusable function.
Previously, hak_tiny_free_legacy_inline() and hak_tiny_free_legacy_impl()
contained identical implementations in malloc_tiny_fast.h and
tiny_c6_ultra_free_box.c.
Changes:
- NEW: core/box/tiny_legacy_fallback_box.h
- tiny_legacy_fallback_free_base(): Unified legacy free implementation
- Encapsulates: Unified Cache push + per-class stats + final fallback
- Contract: BASE pointer input (already extracted from USER ptr)
- Modified: core/front/malloc_tiny_fast.h
- Removed: hak_tiny_free_legacy_inline() (lines 96-111)
- Replaced call: hak_tiny_free_legacy_inline → tiny_legacy_fallback_free_base
- Modified: core/box/tiny_c6_ultra_free_box.c
- Removed: hak_tiny_free_legacy_impl() (lines 17-39)
- Replaced call: hak_tiny_free_legacy_impl → tiny_legacy_fallback_free_base
Benefits:
- Single source of truth (DRY principle)
- Easier to maintain and test
- Consistent behavior across all free paths
- No performance impact (always_inline preserved)
No semantic changes - identical logic, just centralized.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
2025-12-11 19:01:59 +09:00 |
|