75 lines
1.8 KiB
C
75 lines
1.8 KiB
C
|
|
// smallobject_hotbox_v5.c - SmallObject HotBox v5 実装 stub(Phase v5-0)
|
|||
|
|
//
|
|||
|
|
// この段階では完全な fallback stub。v5 route は呼ばれない(ENV default OFF)。
|
|||
|
|
|
|||
|
|
#include <stdlib.h>
|
|||
|
|
#include <stdbool.h>
|
|||
|
|
#include "box/smallsegment_v5_box.h"
|
|||
|
|
#include "box/smallobject_hotbox_v5_box.h"
|
|||
|
|
#include "box/smallobject_cold_iface_v5.h"
|
|||
|
|
#include "box/smallobject_v5_env_box.h"
|
|||
|
|
|
|||
|
|
// TLS context
|
|||
|
|
static __thread SmallHeapCtxV5 g_small_heap_ctx_v5;
|
|||
|
|
|
|||
|
|
SmallHeapCtxV5* small_heap_ctx_v5(void) {
|
|||
|
|
return &g_small_heap_ctx_v5;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Phase v5-0: Fast alloc(stub)
|
|||
|
|
void* small_alloc_fast_v5(size_t size, uint32_t class_idx) {
|
|||
|
|
(void)size;
|
|||
|
|
(void)class_idx;
|
|||
|
|
// v5-0: completely disabled, fallback to existing path
|
|||
|
|
// actual implementation in v5-2
|
|||
|
|
return NULL;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Phase v5-0: Fast free(stub)
|
|||
|
|
void small_free_fast_v5(void* ptr, uint32_t class_idx) {
|
|||
|
|
(void)ptr;
|
|||
|
|
(void)class_idx;
|
|||
|
|
// v5-0: no-op
|
|||
|
|
// actual implementation in v5-2
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Segment stub(v5-2 で実装)
|
|||
|
|
SmallSegmentV5* small_segment_v5_acquire(void) {
|
|||
|
|
return NULL; // stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void small_segment_v5_release(SmallSegmentV5* seg) {
|
|||
|
|
(void)seg;
|
|||
|
|
// stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
SmallPageMetaV5* small_segment_v5_page_meta_of(void* ptr) {
|
|||
|
|
(void)ptr;
|
|||
|
|
return NULL; // stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ColdIface stub(v5-2 で実装)
|
|||
|
|
SmallPageMetaV5* small_cold_v5_refill_page(SmallHeapCtxV5* ctx, uint32_t class_idx) {
|
|||
|
|
(void)ctx;
|
|||
|
|
(void)class_idx;
|
|||
|
|
return NULL; // stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void small_cold_v5_retire_page(SmallHeapCtxV5* ctx, SmallPageMetaV5* page) {
|
|||
|
|
(void)ctx;
|
|||
|
|
(void)page;
|
|||
|
|
// stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool small_cold_v5_remote_push(SmallPageMetaV5* page, void* ptr, uint32_t tid) {
|
|||
|
|
(void)page;
|
|||
|
|
(void)ptr;
|
|||
|
|
(void)tid;
|
|||
|
|
return false; // stub
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void small_cold_v5_remote_drain(SmallHeapCtxV5* ctx) {
|
|||
|
|
(void)ctx;
|
|||
|
|
// stub
|
|||
|
|
}
|