Raise the mod linear-memory cap to 512 MiB (AirDef OOM)
A large raid viewed in the fullscreen map OOM-trapped the mod at the old 64 MiB cap: the ground/section caches plus >200 objects and the recording exhausted it during a hash rehash (Ground::answer). The caches are already count-bounded; 512 MiB gives ample headroom on a desktop while still bounding a runaway guest. Fuel budgets unchanged. Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
@@ -111,8 +111,11 @@ pub use recipes_bindings::horizon::mods::recipes::{
|
||||
};
|
||||
use recipes_bindings::{RecipesHost, horizon::mods::browser, horizon::mods::recipes};
|
||||
|
||||
/// A mod's linear memory cap.
|
||||
const MEMORY: usize = 64 << 20;
|
||||
/// A mod's linear memory cap. AirDef's combat state, world caches and recording
|
||||
/// share this; 64 MiB OOM-trapped a large raid viewed in the fullscreen map (the
|
||||
/// ground/section caches plus >200 objects exhausted it during a hash rehash).
|
||||
/// 512 MiB gives ample headroom on a desktop while still bounding a runaway guest.
|
||||
const MEMORY: usize = 512 << 20;
|
||||
/// Fuel (about one unit per WebAssembly instruction) per call: a bound on
|
||||
/// runaway loops, far above the hooks' time budgets.
|
||||
const FUEL_INIT: u64 = 2_000_000_000;
|
||||
|
||||
Reference in New Issue
Block a user