Skip to main content

SAFEPOINT_FUEL

Constant SAFEPOINT_FUEL 

Source
pub const SAFEPOINT_FUEL: u64 = 10;
Expand description

Fuel charged at every safepoint: a loop back edge, a function call, or an await.

ADR 0001 is explicit that fuel is a coarse runtime control, not a modeled instruction count — real safepoints vary enormously in the CPU work they guard, so no constant here would make fuel mean “instructions executed.” A flat per-safepoint cost keeps that honest: fuel measures how many safepoints a run passed through, which is exactly what bounds a non-terminating loop or an unbounded recursion, and nothing more precise than that is claimed.