- SmallHeapCtx/SmallPageMeta/SmallClassHeap typedef alias 追加 - SmallSegment struct (base/num_pages/owner_tid/magic) を smallsegment_v4_box.h に定義 - SmallColdIface_v4 direct function prototypes (refill/retire/remote_push/drain) - smallobject_hotbox_v4.c の internal/public API 分離(small_segment_v4_internal) - direct function stubs 実装(SmallColdIfaceV4 delegate 形式) - ENV OFF デフォルト(ENABLED=0/CLASSES=0)で既存挙動 100% 不変 - ビルド成功・sanity 確認(mixed/C6-heavy、segv/assert なし) - CURRENT_TASK.md に Phase v4-mid-0 記録 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
28 lines
1.2 KiB
C
28 lines
1.2 KiB
C
// smallobject_cold_iface_v4.h - SmallObject HotHeap v4 Cold Interface (境界 API のみ)
|
||
//
|
||
// 役割:
|
||
// - HotBox_v4 と Superslab/Warm/Remote を繋ぐ関数ポインタの箱を定義する。
|
||
// - 実装は後続フェーズで追加し、いまは型と宣言だけを置く。
|
||
#pragma once
|
||
|
||
#include <stdbool.h>
|
||
#include <stdint.h>
|
||
|
||
#include "smallobject_hotbox_v4_box.h"
|
||
|
||
typedef struct SmallColdIfaceV4 {
|
||
small_page_v4* (*refill_page)(small_heap_ctx_v4*, uint32_t class_idx);
|
||
void (*retire_page)(small_heap_ctx_v4*, uint32_t class_idx, small_page_v4* page);
|
||
bool (*remote_push)(small_page_v4* page, void* ptr, uint32_t self_tid);
|
||
void (*remote_drain)(small_heap_ctx_v4*);
|
||
} SmallColdIfaceV4;
|
||
|
||
// Cold iface accessor(実装は後続フェーズ)
|
||
const SmallColdIfaceV4* small_cold_iface_v4_get(void);
|
||
|
||
// Direct function prototypes (Alternative API for direct calls, not yet implemented)
|
||
small_page_v4* small_cold_v4_refill_page(small_heap_ctx_v4* ctx, uint32_t class_idx);
|
||
void small_cold_v4_retire_page(small_heap_ctx_v4* ctx, small_page_v4* page);
|
||
bool small_cold_v4_remote_push(small_page_v4* page, void* ptr, uint32_t tid);
|
||
void small_cold_v4_remote_drain(small_heap_ctx_v4* ctx);
|