wip: change memory to use recursive paging

This commit is contained in:
0x35c
2025-11-28 11:08:28 +01:00
parent c5f8599d90
commit c33f8fc05d
10 changed files with 95 additions and 149 deletions

View File

@ -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;