starry_core::mm

Function load_user_app

Source
pub fn load_user_app(
    uspace: &mut AddrSpace,
    args: &[String],
    envs: &[String],
) -> AxResult<(VirtAddr, VirtAddr)>
Expand description

Load the user app to the user address space.

§Arguments

  • uspace: The address space of the user app.
  • args: The arguments of the user app. The first argument is the path of the user app.
  • envs: The environment variables of the user app.

§Returns

  • The entry point of the user app.
  • The stack pointer of the user app.