From 182d5535085b2ce892f5e094ac6c9344a6877c78 Mon Sep 17 00:00:00 2001 From: chexit Date: Sat, 21 Nov 2026 17:53:00 +0300 Subject: [PATCH] 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 --- crates/horizon-mods/src/runtime.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;