Files
hakmem/core/box/ss_budget_box.h

20 lines
648 B
C

// 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