Boxify superslab registry, add bench profile, and document C7 hotpath experiments
This commit is contained in:
19
core/box/ss_budget_box.h
Normal file
19
core/box/ss_budget_box.h
Normal 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
|
||||
Reference in New Issue
Block a user