Boxify superslab registry, add bench profile, and document C7 hotpath experiments

This commit is contained in:
Moe Charm (CI)
2025-12-07 03:12:27 +09:00
parent 18faa6a1c4
commit fda6cd2e67
71 changed files with 2052 additions and 286 deletions

19
core/box/ss_budget_box.h Normal file
View File

@ -0,0 +1,19 @@
// ss_budget_box.h - Superslab Budget Box
// Box Theory: centralize budget/limit checks for Superslab allocations.
// Responsibilities:
// - Read budget ENV once (global + per-class override)
// - Provide cheap checks before allocating new Superslabs
// - Allow symmetric free hook for future accounting
#ifndef HAKMEM_SS_BUDGET_BOX_H
#define HAKMEM_SS_BUDGET_BOX_H
#include <stdbool.h>
// Return false when allocation should be denied due to budget exhaustion.
bool ss_budget_on_alloc(int class_idx);
// Hook for future bookkeeping; currently a no-op placeholder.
void ss_budget_on_free(int class_idx);
#endif // HAKMEM_SS_BUDGET_BOX_H