Skip to main content

kernel/
param.rs

1/// maximum number of CPUs
2pub const NCPU: usize = 8;
3
4/// maximum number of processes
5pub const NPROC: usize = 64;
6
7/// open files per process
8pub const NOFILE: usize = 16;
9
10/// open files per system
11pub const NFILE: usize = 100;
12
13/// maximum number of active inodes
14pub const NINODE: usize = 50;
15
16/// maximum major device number
17pub const NDEV: usize = 10;
18
19/// device nubmer of file system root disk
20pub const ROOTDEV: u32 = 1;
21
22/// max exec arguments
23pub const MAXARG: usize = 32;
24
25/// max # of blocks any FS op writes
26pub const MAXOPBLOCKS: usize = 10;
27
28/// max data blocks in on-disk log
29pub const LOGBLOCKS: usize = MAXOPBLOCKS * 3;
30
31/// size of disk block cache
32pub const NBUF: usize = MAXOPBLOCKS * 3;
33
34/// maximum file path name
35pub const MAXPATH: usize = 128;
36
37/// kernel stack pages per process (debug needs more stack to dump)
38#[cfg(debug_assertions)]
39pub const NKSTACK_PAGES: usize = 8;
40#[cfg(not(debug_assertions))]
41pub const NKSTACK_PAGES: usize = 1;
42
43/// user stack pages
44pub const USERSTACK: usize = 4;