proc: copy memmap from parent

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-19 00:07:08 -04:00
commit 30c14a0fef
6 changed files with 85 additions and 11 deletions

View file

@ -66,7 +66,7 @@ int proc_load_file(const char *file, struct proc *proc)
size_t vaddr_offset = cur->p_vaddr & (PAGE_SIZE - 1);
size_t map_size = ALIGN_UP(cur->p_memsz + vaddr_offset, PAGE_SIZE);
char *program = kalloc(map_size, ALLOC_KERN);
char *program = kalloc(map_size, ALLOC_USER);
if (!program)
return -ENOMEM;