xv6 lab5 lazy
1.eliminate allocation from sbrk()uint64
sys_sbrk(void)
{int addr;int n;if(argint(0, &n) < 0)return -1;addr myproc()->sz;myproc()->sz n; //虚拟增加size,而不实际分配物理内存//if(growproc(n) < 0)//return -1;return addr;
}hart 1 s…
2026/7/5 13:26:21