Consolidates the logic for resolving Tiny BASE pointers into
(SuperSlab*, slab_idx, TinySlabMeta*, class_idx) tuples.
Box Theory compliance:
- Single Responsibility: ptr→(ss,slab,meta,class) resolution only
- No side effects: pure classification, no logging, no mutations
- Clear API: 4 functions (classify_raw/base, validate_raw/base_class)
- Fail-fast friendly: callers decide error handling policy
Implementation:
- core/box/tiny_ptr_bridge_box.h: New box (4.7 KB)
- core/box/tls_sll_box.h: Integrated into sanitize_head/check_node
Architecture:
- Used in 3 call sites within TLS SLL Box
- Ready for gradual migration to other code paths
- Foundation for future centralized validation
Testing: 150+ seconds stable (sh8bench)
- 30s test: exit code 0, 0 crashes
- 120s test: exit code 0, 0 crashes
- Behavior: identical to previous hand-rolled implementation
Benefits:
- Single point of authority for ptr→(ss,slab,meta,class) logic
- Easier to add validation rules in future (range check, magic, etc.)
- Consistent API for all ptr classification needs
- Foundation for removing code duplication across allocator
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>