fix: disable dynamic stack growth when VM flag is disabled
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
kernel.bin: DEFINES = -DUSERPROG -DFILESYS
|
||||
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys vm
|
||||
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys
|
||||
TEST_SUBDIRS = tests/userprog tests/userprog/no-vm tests/filesys/base
|
||||
GRADING_FILE = $(SRCDIR)/tests/userprog/Grading
|
||||
SIMULATOR = --qemu
|
||||
|
||||
@@ -146,6 +146,7 @@ page_fault (struct intr_frame *f)
|
||||
write = (f->error_code & PF_W) != 0;
|
||||
user = (f->error_code & PF_U) != 0;
|
||||
|
||||
#ifdef VM
|
||||
if (user && not_present)
|
||||
{
|
||||
if (handle_stack_fault (fault_addr, f->esp))
|
||||
@@ -160,6 +161,7 @@ page_fault (struct intr_frame *f)
|
||||
f->eax = 0xffffffff;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* To implement virtual memory, delete the rest of the function
|
||||
body, and replace it with code that brings in the page to
|
||||
|
||||
Reference in New Issue
Block a user