Home
last modified time | relevance | path

Searched refs:new_mms (Results 1 – 2 of 2) sorted by relevance

/DragonOS-0.1.2/kernel/src/process/
Dfork.c223 struct mm_struct *new_mms = (struct mm_struct *)kmalloc(sizeof(struct mm_struct), 0); in process_copy_mm() local
224 memset(new_mms, 0, sizeof(struct mm_struct)); in process_copy_mm()
226 memcpy(new_mms, current_pcb->mm, sizeof(struct mm_struct)); in process_copy_mm()
227 new_mms->vmas = NULL; in process_copy_mm()
228 pcb->mm = new_mms; in process_copy_mm()
231 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in process_copy_mm()
233 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in process_copy_mm()
236 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]->mm->pgd) + … in process_copy_mm()
241 uint64_t *new_pml4t = (uint64_t *)phys_2_virt(new_mms->pgd); in process_copy_mm()
263 … int ret = mm_create_vma(new_mms, vma->vm_start + i * PAGE_2M_SIZE, PAGE_2M_SIZE, vma->vm_flags, in process_copy_mm()
[all …]
Dprocess.c363 struct mm_struct *new_mms = (struct mm_struct *)kmalloc(sizeof(struct mm_struct), 0); in do_execve() local
364 memset(new_mms, 0, sizeof(struct mm_struct)); in do_execve()
365 current_pcb->mm = new_mms; in do_execve()
368 new_mms->pgd = (pml4t_t *)virt_2_phys(kmalloc(PAGE_4K_SIZE, 0)); in do_execve()
371 memset(phys_2_virt(new_mms->pgd), 0, PAGE_4K_SIZE / 2); in do_execve()
374 …memcpy(phys_2_virt(new_mms->pgd) + 256, phys_2_virt(initial_proc[proc_current_cpu_id]) + 256, PAGE… in do_execve()