diff options
author | Robert Morris <[email protected]> | 2010-09-19 07:18:42 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2010-09-19 07:18:42 -0400 |
commit | 4587b35847b116057e3ef1058da914b8837ff343 (patch) | |
tree | 3c1fbcd2f348c804d21828adce07d67fc3801490 /exec.c | |
parent | faad047ab22cbe989c208bff5ecb42608ecb8d7b (diff) | |
download | xv6-labs-4587b35847b116057e3ef1058da914b8837ff343.tar.gz xv6-labs-4587b35847b116057e3ef1058da914b8837ff343.tar.bz2 xv6-labs-4587b35847b116057e3ef1058da914b8837ff343.zip |
exec questions
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -48,6 +48,9 @@ exec(char *path, char **argv) } iunlockput(ip); + // XXX rtm: what about the BSS? shouldn't there be some + // bzero()ing here? + // Allocate and initialize stack at sz sz = spbottom = PGROUNDUP(sz); if(!(sz = allocuvm(pgdir, sz, sz + PGSIZE))) @@ -62,6 +65,9 @@ exec(char *path, char **argv) sp = sz; argp = sz - arglen - 4*(argc+1); + // XXX rtm: does the following code work if the + // arguments &c do not fit in one page? + // Copy argv strings and pointers to stack. *(uint*)(mem+argp-spbottom + 4*argc) = 0; // argv[argc] for(i=argc-1; i>=0; i--){ |