Files
hakmem/core/hakmem_smallmid.h
Moe Charm (CI) 093f362231 Add Page Box layer for C7 class optimization
- Implement tiny_page_box.c/h: per-thread page cache between UC and Shared Pool
- Integrate Page Box into Unified Cache refill path
- Remove legacy SuperSlab implementation (merged into smallmid)
- Add HAKMEM_TINY_PAGE_BOX_CLASSES env var for selective class enabling
- Update bench_random_mixed.c with Page Box statistics

Current status: Implementation safe, no regressions.
Page Box ON/OFF shows minimal difference - pool strategy needs tuning.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:31:44 +09:00

47 lines
1.4 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.

/**
* hakmem_smallmid.h - Small-Mid Allocator Stub (archived implementation)
*
* 現在のコードベースでは SmallMid フロント/バックエンドは使用せず、
* Tiny/Tiny-Plus で 1KB までを処理します。
*
* ただし、既存の境界hak_alloc_api / hakmem_tiny からの呼び出し)は維持するため、
* API だけを残した「常に無効な Stub Box」として定義します。
*
* 元の実装は archive/smallmid/ 以下に移動済みです。
*/
#ifndef HAKMEM_SMALLMID_H
#define HAKMEM_SMALLMID_H
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
// 旧実装と互換の定数だけ残す(値は使われないがビルドを安定させる)
#define SMALLMID_NUM_CLASSES 3
// 便宜上の範囲定義小さくしておくが、smallmid_is_enabled()==false なので実行はされない)
#define SMALLMID_MIN_SIZE (256)
#define SMALLMID_MAX_SIZE (1024)
// API スタブ
// 旧実装と互換のヘルパー(インライン宣言のみ、実体は stub .c で定義)
bool smallmid_is_in_range(size_t size);
void smallmid_init(void);
void* smallmid_alloc(size_t size);
void smallmid_free(void* ptr);
void smallmid_thread_exit(void);
// SmallMid が有効かどうか(現在は常に false を返す stub 実装)
bool smallmid_is_enabled(void);
#ifdef __cplusplus
}
#endif
#endif // HAKMEM_SMALLMID_H