Implement Phase 2: Headerless Allocator Support (Partial)
- Feature: Added HAKMEM_TINY_HEADERLESS toggle (A/B testing) - Feature: Implemented Headerless layout logic (Offset=0) - Refactor: Centralized layout definitions in tiny_layout_box.h - Refactor: Abstracted pointer arithmetic in free path via ptr_conversion_box.h - Verification: sh8bench passes in Headerless mode (No TLS_SLL_HDR_RESET) - Known Issue: Regression in Phase 1 mode due to blind pointer conversion logic
This commit is contained in:
@ -126,7 +126,7 @@ __attribute__((always_inline))
|
||||
static inline int free_tiny_fast(void* ptr) {
|
||||
if (__builtin_expect(!ptr, 0)) return 0;
|
||||
|
||||
#ifdef HAKMEM_TINY_HEADER_CLASSIDX
|
||||
#if HAKMEM_TINY_HEADER_CLASSIDX
|
||||
// 1. ページ境界ガード:
|
||||
// ptr がページ先頭 (offset==0) の場合、ptr-1 は別ページか未マップ領域になる可能性がある。
|
||||
// その場合はヘッダ読みを行わず、通常 free 経路にフォールバックする。
|
||||
|
||||
Reference in New Issue
Block a user