diff --git a/src/userprog/process.c b/src/userprog/process.c index ffd964b..452f020 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -118,6 +118,10 @@ start_process (void *file_name_) /* TODO: Allocate an extra page for the rest of the process stack. */ } + /* Align stack pointer to word size before pushing argv elements for + performance. */ + if_.esp -= align_size * sizeof (uint8_t); + /* Push pointers to process arguments from argument linked list */ struct list_elem *e = list_begin (&arg_list); struct list_elem *tail = list_tail (&arg_list);