Lines Matching refs:region
171 VirtPageFrame::new(vma_guard.region.start()), in try_clone()
172 PageFrameCount::new(vma_guard.region.size() / MMArch::PAGE_SIZE), in try_clone()
317 let region = match addr { in mmap() localVariable
328 let page = VirtPageFrame::new(region.start()); in mmap()
378 let r = r.lock().region; in munmap()
380 let intersection = r.lock().region().intersect(&to_unmap).unwrap(); in munmap()
424 let region = VirtRegion::new(start_page.virt_address(), page_count.bytes()); in mprotect() localVariable
427 let regions = self.mappings.conflicts(region).collect::<Vec<_>>(); in mprotect()
432 let r = r.lock().region().clone(); in mprotect()
435 let intersection = r.lock().region().intersect(®ion).unwrap(); in mprotect()
610 if guard.region.contains(vaddr) { in contains()
622 .filter(move |v| !v.lock().region.intersect(&request).is_none()) in conflicts()
653 let region = VirtRegion::new(cmp::max(*hole_vaddr, min_vaddr), *size); in find_free() localVariable
654 return Some(region); in find_free()
702 fn reserve_hole(&mut self, region: &VirtRegion) { in reserve_hole()
704 self.vm_holes.range_mut(..region.start()).next_back(); in reserve_hole()
709 if prev_hole_end > region.start() { in reserve_hole()
711 *prev_hole_size = region.start().data() - prev_hole_vaddr.data(); in reserve_hole()
714 if prev_hole_end > region.end() { in reserve_hole()
717 .insert(region.end(), prev_hole_end - region.end()); in reserve_hole()
724 fn unreserve_hole(&mut self, region: &VirtRegion) { in unreserve_hole()
726 let next_hole_size: Option<usize> = self.vm_holes.remove(®ion.end()); in unreserve_hole()
730 .range_mut(..region.start()) in unreserve_hole()
732 .filter(|(offset, size)| offset.data() + **size == region.start().data()) in unreserve_hole()
734 *prev_hole_size += region.size() + next_hole_size.unwrap_or(0); in unreserve_hole()
737 .insert(region.start(), region.size() + next_hole_size.unwrap_or(0)); in unreserve_hole()
743 let region = vma.lock().region.clone(); in insert_vma() localVariable
745 assert!(self.conflicts(region).next().is_none()); in insert_vma()
746 self.reserve_hole(®ion); in insert_vma()
759 pub fn remove_vma(&mut self, region: &VirtRegion) -> Option<Arc<LockedVMA>> { in remove_vma()
763 .drain_filter(|vma| vma.lock().region == *region) in remove_vma()
765 self.unreserve_hole(region); in remove_vma()
830 for page in guard.region.pages() { in remap()
849 for page in guard.region.pages() { in unmap()
879 region: VirtRegion, in extract()
885 assert!(region.start().check_aligned(MMArch::PAGE_SIZE)); in extract()
886 assert!(region.end().check_aligned(MMArch::PAGE_SIZE)); in extract()
891 if unlikely(region.start() < guard.region.start() || region.end() > guard.region.end()) in extract()
896 let intersect: Option<VirtRegion> = guard.region.intersect(®ion); in extract()
902 if unlikely(intersect == guard.region) { in extract()
908 let before: Option<Arc<LockedVMA>> = guard.region.before(®ion).map(|virt_region| { in extract()
910 vma.region = virt_region; in extract()
916 let after: Option<Arc<LockedVMA>> = guard.region.after(®ion).map(|virt_region| { in extract()
918 vma.region = virt_region; in extract()
924 guard.region = region; in extract()
936 region: VirtRegion, field
948 self.region.hash(state); in hash()
956 pub fn region(&self) -> &VirtRegion { in region() method
957 return &self.region; in region()
967 region: self.region, in clone()
982 VirtPageFrame::new(self.region.start()), in pages()
983 VirtPageFrame::new(self.region.end()), in pages()
994 for page in self.region.pages() { in remap()
1063 region: VirtRegion::new(destination.virt_address(), count.data() * MMArch::PAGE_SIZE), in physmap()
1108 region: VirtRegion::new( in zeroed()
1145 return self.region == other.region; in eq()
1153 return self.region.partial_cmp(&other.region); in partial_cmp()
1159 return self.region.cmp(&other.region); in cmp()