From 4efd227b701cd02cdda1762ddffe41838601cb9d Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 23 May 2024 14:48:37 +0800 Subject: [PATCH] add an extra reserved page for the swapper on cramium-soc an extra page of stack ends up being used to accommodate the page buffer needed for SPIM implementation --- services/xous-swapper/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/xous-swapper/src/main.rs b/services/xous-swapper/src/main.rs index 1dbc190be..7e4813a1e 100644 --- a/services/xous-swapper/src/main.rs +++ b/services/xous-swapper/src/main.rs @@ -236,9 +236,10 @@ static MAYBE_HARD_OOM_DURING_OOM_DOOM: AtomicBool = AtomicBool::new(false); /// /// Known things the swapper has to allocate memory for in hard-OOM: /// - L1 page table entries for tracking swap -/// - A second page will be requested in case of panic in hard OOM for TLS, but these shouldn't happen so we -/// don't reserve it. -const HARD_OOM_RESERVED_PAGES: usize = 1; +/// - An extra page for stack (needed for cramium targets, but not on precursor due to HAL differences) +/// - An additional page will be requested in case of panic in hard OOM for TLS, but these shouldn't happen +/// so we don't reserve it. +const HARD_OOM_RESERVED_PAGES: usize = 2; /// This structure contains shared state accessible between the userspace code and the blocking swap call /// handler.