Why Xinu OS rounds stack size when creating a new process?
Posted: Wed Mar 14, 2018 8:44 am
I'm taking a look into the Xinu's code trying to understand what some parts of the code does in the system.
In the function create, that creates a new process, the stack size of the process, an argument defined by the user, is rounded with a function called roundew. I read the docs but I'm not sure if I understand exactly what that function does and why is needed to do that with size of the stack.
Is it just a 4-byte memory alignment? I'm learning about this subject right now, so I don't understand exactly why memory alignment is so important and how an OS implements it.
In the function create, that creates a new process, the stack size of the process, an argument defined by the user, is rounded with a function called roundew. I read the docs but I'm not sure if I understand exactly what that function does and why is needed to do that with size of the stack.
Is it just a 4-byte memory alignment? I'm learning about this subject right now, so I don't understand exactly why memory alignment is so important and how an OS implements it.