fix: capacities single-sourced in types (display MAX_WINDOWS/BUFFER_PAGES, storage MAX_CLIENTS), display + storage budgets derived from them, const asserts on VA layouts; kernel regions 64 -> 256

This commit is contained in:
2026-10-28 16:06:55 +01:00
parent 495bf03484
commit 3b71f29f4c
9 changed files with 38 additions and 15 deletions

View File

@@ -24,6 +24,8 @@ use types::permission::{Permission, PermissionSet};
/// Client buffers sit high in storage's window, clear of its heap.
const BUFFERS_VA: VirtualAddress = VirtualAddress::from_raw(0x0100_0000);
// Every client's buffer fits below the disk driver's mappings (0x01D0_0000).
const _: () = assert!(0x0100_0000 + types::storage::MAX_CLIENTS * protocol::BUFFER_SIZE <= 0x01D0_0000);
const EP: CapSlot = CapSlot::const_new(0);

View File

@@ -9,8 +9,7 @@ use crate::scope::Scope;
mod session;
/// Connections at once: every program reading files, apps among them.
const MAX_CLIENTS: usize = 16;
use types::storage::MAX_CLIENTS;
/// Handles at or past this are never valid (the file systems hand out
/// fewer), so ownership fits a small table.
const MAX_HANDLES: usize = 16;