17 lines
615 B
C
17 lines
615 B
C
|
|
// front_gate_box.h - Front Gate Box (SFC/SLL priority and helpers)
|
||
|
|
#pragma once
|
||
|
|
#include <stddef.h>
|
||
|
|
#include "hakmem_tiny.h"
|
||
|
|
|
||
|
|
// Try to pop a block from Front Gate (SFC -> TLS SLL).
|
||
|
|
// Returns 1 on success and stores the pointer to *out_ptr, else 0.
|
||
|
|
int front_gate_try_pop(int class_idx, void** out_ptr);
|
||
|
|
|
||
|
|
// After backend refill, optionally cascade some blocks SLL -> SFC.
|
||
|
|
// Intended to keep SFC warm without extra backend calls.
|
||
|
|
void front_gate_after_refill(int class_idx, int refilled_count);
|
||
|
|
|
||
|
|
// Push a block to TLS freelist (SLL). Used by free fast path.
|
||
|
|
void front_gate_push_tls(int class_idx, void* ptr);
|
||
|
|
|