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).
feat/start
Frans Kaashoek 2019-07-22 14:30:45 -04:00
parent c5d48db045
commit 5eab649255
1 changed files with 1 additions and 1 deletions

View File

@ -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)