Lines Matching refs:range

42   MappedRange range;  in MapWithID()  local
43 range.real_addr = real_addr; in MapWithID()
44 range.size = size; in MapWithID()
45 range.id = id; in MapWithID()
46 range.offset_base = offset_base; in MapWithID()
66 if (!iter->Intersects(range)) continue; in MapWithID()
69 if (old_range_iter == mappings_.end() && iter->Covers(range) && in MapWithID()
70 iter->size > range.size) { in MapWithID()
88 uint64_t gap_before = range.real_addr - old_range.real_addr; in MapWithID()
90 (old_range.real_addr + old_range.size) - (range.real_addr + range.size); in MapWithID()
96 if ((gap_before && GetAlignedOffset(range.real_addr)) || in MapWithID()
97 (gap_after && GetAlignedOffset(range.real_addr + range.size))) { in MapWithID()
113 if (!MapWithID(range.real_addr, range.size, id, offset_base, false)) { in MapWithID()
114 LOG(ERROR) << "Could not map new range at " << std::hex << range.real_addr in MapWithID()
115 << " to " << range.real_addr + range.size << " over old range"; in MapWithID()
120 if (!MapWithID(range.real_addr + range.size, gap_after, old_range.id, in MapWithID()
121 old_range.offset_base + gap_before + range.size, false)) { in MapWithID()
136 page_alignment_ ? GetAlignedOffset(range.real_addr) : 0; in MapWithID()
140 range.mapped_addr = page_offset; in MapWithID()
141 range.unmapped_space_after = UINT64_MAX - range.size - page_offset; in MapWithID()
142 mappings_.push_back(range); in MapWithID()
144 std::make_pair(range.real_addr, mappings_.begin())); in MapWithID()
149 if (mappings_.begin()->mapped_addr >= range.size + page_offset) { in MapWithID()
150 range.mapped_addr = page_offset; in MapWithID()
151 range.unmapped_space_after = in MapWithID()
152 mappings_.begin()->mapped_addr - range.size - page_offset; in MapWithID()
153 mappings_.push_front(range); in MapWithID()
155 real_addr_to_mapped_range_.insert(std::make_pair(range.real_addr, iter)); in MapWithID()
175 uint64_t mapping_offset = GetAlignedOffset(range.real_addr); in MapWithID()
177 next_page_boundary + mapping_offset + range.size; in MapWithID()
185 range.mapped_addr = next_page_boundary + mapping_offset; in MapWithID()
186 range.unmapped_space_after = in MapWithID()
189 range.mapped_addr - end_of_existing_mapping; in MapWithID()
191 if (existing_mapping.unmapped_space_after < range.size) continue; in MapWithID()
193 range.mapped_addr = existing_mapping.mapped_addr + existing_mapping.size; in MapWithID()
194 range.unmapped_space_after = in MapWithID()
195 existing_mapping.unmapped_space_after - range.size; in MapWithID()
199 mappings_.insert(++iter, range); in MapWithID()
201 real_addr_to_mapped_range_.insert(std::make_pair(range.real_addr, iter)); in MapWithID()
262 const MappedRange& range = *mapping_iter; in Unmap() local
265 range.size + range.unmapped_space_after; in Unmap()