mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 10:06:31 +00:00
Combine vma (#42)
* 合并vma * 调整vma映射,修复bug * 删除注释 Co-authored-by: fslongjin <longjin@RinGoTek.cn> Co-authored-by: houmkh <100781004+houmkh@users.noreply.github.com>
This commit is contained in:
@ -615,7 +615,8 @@ uint64_t mm_do_brk(uint64_t old_brk_end_addr, int64_t offset)
|
||||
{
|
||||
struct vm_area_struct *vma = NULL;
|
||||
mm_create_vma(current_pcb->mm, i, PAGE_2M_SIZE, VM_USER | VM_ACCESS_FLAGS, NULL, &vma);
|
||||
mm_map_vma(vma, alloc_pages(ZONE_NORMAL, 1, PAGE_PGT_MAPPED)->addr_phys);
|
||||
mm_map(current_pcb->mm, i, PAGE_2M_SIZE, alloc_pages(ZONE_NORMAL, 1, PAGE_PGT_MAPPED)->addr_phys);
|
||||
// mm_map_vma(vma, alloc_pages(ZONE_NORMAL, 1, PAGE_PGT_MAPPED)->addr_phys, 0, PAGE_2M_SIZE);
|
||||
}
|
||||
current_pcb->mm->brk_end = end_addr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user