Allocate 2 pages per proc, with the top one unmapped.
The page below the last proc is unmapped by default (because the kernel doesn't map anything right below the kernel stacks).
This commit is contained in:
parent
c5d48db045
commit
5eab649255
|
@ -53,4 +53,4 @@
|
|||
// map the trampoline page to the highest address,
|
||||
// in both user and kernel space.
|
||||
#define TRAMPOLINE (MAXVA - PGSIZE)
|
||||
#define KSTACK(p) ((TRAMPOLINE-PGSIZE)-p*2*PGSIZE)
|
||||
#define KSTACK(p) (TRAMPOLINE - (p+1)* 2*PGSIZE)
|
||||
|
|
Loading…
Reference in a new issue