Expand description
Loading user applications into memory
For chapter 3, user applications are simply part of the data included in the
kernel binary, so we only need to copy them to the space allocated for each
app to load them. We also allocate fixed spaces for each task’s
KernelStack
and UserStack
.
Structs§
Statics§
Functions§
- Get base address of app i.
- Get the total number of applications.
- get app info with entry and sp and save
TrapContext
in kernel stack - Load nth user app at [APP_BASE_ADDRESS + n * APP_SIZE_LIMIT, APP_BASE_ADDRESS + (n+1) * APP_SIZE_LIMIT).