Update start_process to pad process stack before pushing argv elements for performance
This commit is contained in:
@@ -118,6 +118,10 @@ start_process (void *file_name_)
|
|||||||
/* TODO: Allocate an extra page for the rest of the process stack. */
|
/* 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 */
|
/* Push pointers to process arguments from argument linked list */
|
||||||
struct list_elem *e = list_begin (&arg_list);
|
struct list_elem *e = list_begin (&arg_list);
|
||||||
struct list_elem *tail = list_tail (&arg_list);
|
struct list_elem *tail = list_tail (&arg_list);
|
||||||
|
|||||||
Reference in New Issue
Block a user