12345678910111213141516171819202122232425262728 |
- #include "mm.h"
- #include "slab.h"
- struct vm_area_struct * vm_area_alloc(struct mm_struct *mm)
- {
- struct vm_area_struct * vma = (struct vm_area_struct *)kmalloc(sizeof(struct vm_area_struct),0);
- if(vma)
- vma_init(vma, mm);
- return vma;
- }
- void vm_area_free(struct vm_area_struct *vma)
- {
- if(list_empty(&vma->list))
- vma->vm_mm->vmas = NULL;
- kfree(vma);
- }
|