Summary of Changes: MOVED TO ARCHIVE: - core/hakmem_tiny_legacy_slow_box.inc → archive/ * Slow path legacy code preserved for reference * Superseded by Gatekeeper Box architecture - core/superslab_allocate.c → archive/superslab_allocate_legacy.c * Legacy SuperSlab allocation implementation * Functionality integrated into new Box system - core/superslab_head.c → archive/superslab_head_legacy.c * Legacy slab head management * Refactored through Box architecture REMOVED DEAD CODE: - Eliminated unused allocation policy variants from ss_allocation_box.c * Reduced from 127+ lines of conditional logic to focused implementation * Removed: old policy branches, unused allocation strategies * Kept: current Box-based allocation path ADDED NEW INFRASTRUCTURE: - core/superslab_head_stub.c (41 lines) * Minimal stub for backward compatibility * Delegates to new architecture - Enhanced core/superslab_cache.c (75 lines added) * Added missing API functions for cache management * Proper interface for SuperSlab cache integration REFACTORED CORE SYSTEMS: - core/hakmem_super_registry.c * Moved registration logic from scattered locations * Centralized SuperSlab registry management - core/hakmem_tiny.c * Removed 27 lines of redundant initialization * Simplified through Box architecture - core/hakmem_tiny_alloc.inc * Streamlined allocation path to use Gatekeeper * Removed legacy decision logic - core/box/ss_allocation_box.c/h * Dramatically simplified allocation policy * Removed conditional branches for unused strategies * Focused on current Box-based approach BUILD SYSTEM: - Updated Makefile for archive structure - Removed obsolete object file references - Maintained build compatibility SAFETY & TESTING: - All deletions verified: no broken references - Build verification: RELEASE=0 and RELEASE=1 pass - Smoke tests: 100% pass rate - Functional verification: allocation/free intact Architecture Consolidation: Before: Multiple overlapping allocation paths with legacy code branches After: Single unified path through Gatekeeper Boxes with clear architecture Benefits: - Reduced code size and complexity - Improved maintainability - Single source of truth for allocation logic - Better diagnostic/observability hooks - Foundation for future optimizations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Archive Directory
This directory contains historical documents, old benchmark results, and experimental work from the HAKMEM memory allocator project.
Structure
phase2/ - Phase 2 Documentation
Phase 2 modularization work (completed):
- IMPLEMENTATION_ROADMAP.md - Original Phase 2 roadmap
- P0_SUCCESS_REPORT.md - P0 batch refill success report (+5.16% improvement)
- README_PHASE_2C.txt - Phase 2C module extraction notes
- PHASE2_MODULE6_*.txt - Module 6 quick reference and summary
analysis/ - Historical Analysis Reports
Research and analysis documents from various optimization phases:
- RING_SIZE_* (4 files) - Ring buffer size analysis
- 3LAYER_* (2 files) - 3-layer allocation strategy experiments
- COMPARISON files - Performance comparisons
- MT_SAFETY_FINDINGS.txt - Multi-threading safety analysis
- NEXT_STEP_ANALYSIS.md - Strategic planning
- gemini_*.txt (4 files) - AI-assisted code reviews
old_benches/ - Historical Benchmark Results
Benchmark results from earlier phases:
- bench_phase*.txt - Phase milestone benchmarks
- bench_step*.txt - Step-by-step optimization results
- bench_reserve*.txt - Reserve pool experiments
- bench_*_results.txt - Various benchmark runs
old_logs/ - Debug and Test Logs
Debug logs, test outputs, and build logs:
- debug_*.log - Debug session logs
- test_*.log - Test execution logs
- obs_*.log - Observation/profiling logs
- build_pgo*.log - PGO build logs
- phase*.log - Phase-specific logs
experimental_scripts/ - Experimental Scripts
Scripts from A/B testing and parameter sweeps:
- ab_*.sh - A/B testing scripts
- sweep_*.sh - Parameter sweep scripts
- prof_sweep.sh - Profile sweeping
- reorg_plan_a.sh - Reorganization experiments
Timeline
- Phase 1: Initial implementation
- Phase 2: Modularization (Module 1-6)
- Module 2: Ring buffer optimization
- Module 6: L2 pool extraction
- P0: Batch refill (+5.16%)
- Phase 3: Mid Range MT allocator (current)
- Goal: 100-120M ops/sec
- Result: 110M ops/sec (achieved!)
Restoration
All files in this archive can be restored to the root directory if needed:
# Restore Phase 2 docs
cp archive/phase2/*.md .
# Restore specific analysis
cp archive/analysis/RING_SIZE_INDEX.md .
# Restore benchmark results
cp archive/old_benches/bench_phase1_results.txt .
See Also
CLEANUP_SUMMARY_2025_11_01.md- Detailed cleanup reportbench_results/- Current benchmark resultsperf_data/- Performance profiling data
Archived: 2025-11-01 Total: 71 files preserved