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

@@ -139,6 +139,12 @@ pub mod window {
pub const BADGE: usize = 1 << 61;
pub const OK: usize = 0;
pub const PIXEL_BYTES: usize = 4;
/// Windows open at once. Each has a pixel buffer of the display's (as
/// does the screen), so this is what the display's budget is made of.
pub const MAX_WINDOWS: usize = 8;
/// The most a pixel buffer (a window's, the screen's) takes: room for
/// 1280x800.
pub const BUFFER_PAGES: usize = 1024;
/// Longest name the OS bar shows.
pub use crate::name::BYTES as NAME_BYTES;

View File

@@ -4,6 +4,10 @@
/// Size of each client's buffer.
pub const BUFFER_PAGES: usize = 16;
/// Connections at once (every program reading files, apps among them):
/// each has a buffer of storage's, so this is what storage's budget is
/// made of.
pub const MAX_CLIENTS: usize = 16;
pub const BUFFER_SIZE: usize = BUFFER_PAGES * 4096;
/// Longest path the server will look at.
pub const MAX_PATH: usize = 255;