wip: change memory to use recursive paging
This commit is contained in:
@ -16,12 +16,14 @@ struct pcb *create_process(uid_t uid)
|
||||
new_pcb->pid = pid++;
|
||||
new_pcb->tid = 1;
|
||||
|
||||
new_pcb->heap = kalloc_pages(4096, &new_pcb->cr3);
|
||||
new_pcb->heap = kalloc_pages(4096);
|
||||
if (!new_pcb->heap) {
|
||||
kfree(new_pcb);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(new_pcb->heap, current_pd, 4096);
|
||||
new_pcb->cr3 =
|
||||
(void *)((uint32_t)VA2PTE((uint32_t)new_pcb->heap) & PAGE_MASK);
|
||||
memcpy(new_pcb->heap, PD, 4096);
|
||||
|
||||
new_pcb->daddy = NULL;
|
||||
new_pcb->children = NULL;
|
||||
|
||||
Reference in New Issue
Block a user