diff --git a/crates/horizon-mods/src/runtime.rs b/crates/horizon-mods/src/runtime.rs index 340da3dd1..73d1c62c3 100644 --- a/crates/horizon-mods/src/runtime.rs +++ b/crates/horizon-mods/src/runtime.rs @@ -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;