MCPcopy Create free account
hub / github.com/SmallPond/MIT6.828_OS / init_stack

Function init_stack

lab/lib/spawn.c:190–265  ·  view source on GitHub ↗

Set up the initial stack page for the new child process with envid 'child' using the arguments array pointed to by 'argv', which is a null-terminated array of pointers to null-terminated strings. On success, returns 0 and sets *init_esp to the initial stack pointer with which the child should start. Returns < 0 on failure.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

spawnFunction · 0.85

Calls 5

strlenFunction · 0.70
sys_page_allocFunction · 0.70
strcpyFunction · 0.70
sys_page_mapFunction · 0.70
sys_page_unmapFunction · 0.70

Tested by

no test coverage detected