Files
hakmem/core/box/smallobject_cold_iface_v4.h
Moe Charm (CI) 52c65da783 Phase v4-mid-0: Small-object v4 型・IF 足場(箱化モジュール化)
- 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>
2025-12-10 23:23:07 +09:00

28 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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);