2025-11-07 01:27:04 +09:00
|
|
|
// 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.
|
2025-12-04 04:58:22 +09:00
|
|
|
void front_gate_push_tls(int class_idx, hak_base_ptr_t ptr);
|
2025-11-07 01:27:04 +09:00
|
|
|
|