forked from Bananymous/banan-os
Kernel: Fix bug in Process::create_userspace()
We used to write more than we needed to. This could lead to unwanted page faults
This commit is contained in:
parent
7b19d6e479
commit
175f07cd2f
|
@ -83,7 +83,7 @@ namespace Kernel
|
|||
}
|
||||
process->m_mmu->load();
|
||||
memcpy((void*)elf_program_header.p_vaddr, elf->data() + elf_program_header.p_offset, elf_program_header.p_filesz);
|
||||
memset((void*)(elf_program_header.p_vaddr + elf_program_header.p_filesz), 0, elf_program_header.p_memsz);
|
||||
memset((void*)(elf_program_header.p_vaddr + elf_program_header.p_filesz), 0, elf_program_header.p_memsz - elf_program_header.p_filesz);
|
||||
Process::current().mmu().load();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue