mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
add an extra reserved page for OOM handler
seems an extra page is necessary to handle the edge case of OOM during lend/move
This commit is contained in:
parent
755265d290
commit
1648567c18
1 changed files with 2 additions and 3 deletions
|
|
@ -160,9 +160,8 @@ pub struct SwapCountTracker {
|
||||||
/// Known things the swapper has to allocate memory for in hard-OOM:
|
/// Known things the swapper has to allocate memory for in hard-OOM:
|
||||||
/// - L1 page table entries for tracking swap
|
/// - L1 page table entries for tracking swap
|
||||||
/// - An extra page for stack (needed for cramium targets, but not on precursor due to HAL differences)
|
/// - 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
|
/// - An additional page seems to be necessary for handling OOM-during-move-or-lend edge cases.
|
||||||
/// so we don't reserve it.
|
const HARD_OOM_RESERVED_PAGES: usize = 3;
|
||||||
const HARD_OOM_RESERVED_PAGES: usize = 2;
|
|
||||||
|
|
||||||
/// This structure contains shared state accessible between the userspace code and the blocking swap call
|
/// This structure contains shared state accessible between the userspace code and the blocking swap call
|
||||||
/// handler.
|
/// handler.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue