- Update environment profile presets and visibility analysis - Enhance small object and tiny segment v4 box implementations - Refine C7 ultra and C6 heavy allocation strategies - Add comprehensive performance metrics and design documentation 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
// tiny_c7_ultra_box.h - C7 ULTRA TLS box (UF-2: TLS freelist, coldはv3を利用)
|
||
#pragma once
|
||
|
||
#include <stdbool.h>
|
||
#include <stddef.h>
|
||
#include <stdint.h>
|
||
#include "tiny_c7_ultra_segment_box.h"
|
||
|
||
// Hot box: per-thread TLS context (UF-1 ではフィールドは未使用だが将来の ULTRA 用に定義)
|
||
typedef struct tiny_c7_ultra_tls_t {
|
||
void* page_base; // ULTRA 専用 C7 ページ基底
|
||
size_t block_size; // C7 ブロックサイズ
|
||
uint32_t capacity; // ページ内スロット数
|
||
uint32_t used; // 現在使用中スロット
|
||
void* freelist; // ULTRA 用 freelist 先頭
|
||
uint32_t page_idx; // セグメント内ページ index
|
||
tiny_c7_ultra_segment_t* seg; // 所有セグメント
|
||
tiny_c7_ultra_page_meta_t* page_meta; // 現在のページメタ
|
||
bool headers_initialized; // carve 済みヘッダが有効か
|
||
} tiny_c7_ultra_tls_t;
|
||
|
||
// TLS accessor
|
||
tiny_c7_ultra_tls_t* tiny_c7_ultra_tls_get(void);
|
||
|
||
// ULTRA alloc/free entry points(UF-1 は v3 C7 に委譲)
|
||
void* tiny_c7_ultra_alloc(size_t size);
|
||
void tiny_c7_ultra_free(void* ptr);
|