Update start_process to pad process stack before pushing argv elements for performance

This commit is contained in:
Themis Demetriades
2024-11-04 00:19:36 +00:00
parent 62d2cb54e5
commit 6f9c911ebe

View File

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