Lines Matching refs:area

99 	VMUserArea* area = fAreas.LeftMost();  in FirstArea()  local
100 while (area != NULL && area->id == RESERVED_AREA_ID) in FirstArea()
101 area = fAreas.Next(area); in FirstArea()
102 return area; in FirstArea()
109 VMUserArea* area = static_cast<VMUserArea*>(_area); in NextArea() local
110 area = fAreas.Next(area); in NextArea()
111 while (area != NULL && area->id == RESERVED_AREA_ID) in NextArea()
112 area = fAreas.Next(area); in NextArea()
113 return area; in NextArea()
128 VMUserArea* area = static_cast<VMUserArea*>(_area); in DeleteArea() local
129 area->~VMUserArea(); in DeleteArea()
130 free_etc(area, allocationFlags); in DeleteArea()
138 VMUserArea* area = fAreas.FindClosest(address, true); in LookupArea() local
139 if (area == NULL || area->id == RESERVED_AREA_ID) in LookupArea()
142 return area->ContainsAddress(address) ? area : NULL; in LookupArea()
150 VMUserArea* area = fAreas.FindClosest(address, less); in FindClosestArea() local
151 while (area != NULL && area->id == RESERVED_AREA_ID) in FindClosestArea()
152 area = fAreas.Next(area); in FindClosestArea()
153 return area; in FindClosestArea()
167 VMUserArea* area = static_cast<VMUserArea*>(_area); in InsertArea() local
198 addressRestrictions->alignment, area, allocationFlags); in InsertArea()
201 *_address = (void*)area->Base(); in InsertArea()
202 fFreeSpace -= area->Size(); in InsertArea()
213 VMUserArea* area = static_cast<VMUserArea*>(_area); in RemoveArea() local
215 fAreas.Remove(area); in RemoveArea()
217 if (area->id != RESERVED_AREA_ID) { in RemoveArea()
219 fFreeSpace += area->Size(); in RemoveArea()
225 VMUserAddressSpace::CanResizeArea(VMArea* area, size_t newSize) in CanResizeArea() argument
227 VMUserArea* next = fAreas.Next(static_cast<VMUserArea*>(area)); in CanResizeArea()
228 addr_t newEnd = area->Base() + (newSize - 1); in CanResizeArea()
241 && (uint64)next->cache_offset <= (uint64)area->Base() in CanResizeArea()
250 VMUserArea* area = static_cast<VMUserArea*>(_area); in ResizeArea() local
252 addr_t newEnd = area->Base() + (newSize - 1); in ResizeArea()
253 VMUserArea* next = fAreas.Next(area); in ResizeArea()
256 || (uint64)next->cache_offset > (uint64)area->Base() in ResizeArea()
259 "should have the address space lock", area); in ResizeArea()
264 addr_t offset = area->Base() + newSize - next->Base(); in ResizeArea()
277 area->SetSize(newSize); in ResizeArea()
283 VMUserAddressSpace::ShrinkAreaHead(VMArea* area, size_t size, in ShrinkAreaHead() argument
286 size_t oldSize = area->Size(); in ShrinkAreaHead()
290 area->SetBase(area->Base() + oldSize - size); in ShrinkAreaHead()
291 area->SetSize(size); in ShrinkAreaHead()
298 VMUserAddressSpace::ShrinkAreaTail(VMArea* area, size_t size, in ShrinkAreaTail() argument
301 size_t oldSize = area->Size(); in ShrinkAreaTail()
305 area->SetSize(size); in ShrinkAreaTail()
323 VMUserArea* area = VMUserArea::CreateReserved(this, flags, allocationFlags); in ReserveAddressRange() local
324 if (area == NULL) in ReserveAddressRange()
327 status_t status = InsertArea(area, size, addressRestrictions, in ReserveAddressRange()
330 area->~VMUserArea(); in ReserveAddressRange()
331 free_etc(area, allocationFlags); in ReserveAddressRange()
335 area->cache_offset = area->Base(); in ReserveAddressRange()
355 VMUserArea* area = fAreas.FindClosest(address, false); in UnreserveAddressRange() local
356 if (area == NULL) in UnreserveAddressRange()
360 for (VMUserAreaTree::Iterator it = fAreas.GetIterator(area); in UnreserveAddressRange()
361 (area = it.Next()) != NULL in UnreserveAddressRange()
362 && area->Base() + area->Size() - 1 <= endAddress;) { in UnreserveAddressRange()
364 if (area->id == RESERVED_AREA_ID) { in UnreserveAddressRange()
366 RemoveArea(area, allocationFlags); in UnreserveAddressRange()
368 area->~VMUserArea(); in UnreserveAddressRange()
369 free_etc(area, allocationFlags); in UnreserveAddressRange()
381 VMUserArea* area = it.Next();) { in UnreserveAllAddressRanges()
382 if (area->id == RESERVED_AREA_ID) { in UnreserveAllAddressRanges()
383 RemoveArea(area, allocationFlags); in UnreserveAllAddressRanges()
385 area->~VMUserArea(); in UnreserveAllAddressRanges()
386 free_etc(area, allocationFlags); in UnreserveAllAddressRanges()
399 VMUserArea* area = it.Next();) { in Dump()
400 kprintf(" area 0x%" B_PRIx32 ": ", area->id); in Dump()
401 kprintf("base_addr = 0x%lx ", area->Base()); in Dump()
402 kprintf("size = 0x%lx ", area->Size()); in Dump()
404 area->id != RESERVED_AREA_ID ? area->name : "reserved"); in Dump()
405 kprintf("protection = 0x%" B_PRIx32 "\n", area->protection); in Dump()
449 VMUserArea* area, uint32 allocationFlags) in _InsertAreaIntoReservedRegion() argument
507 area->SetBase(start); in _InsertAreaIntoReservedRegion()
508 area->SetSize(size); in _InsertAreaIntoReservedRegion()
509 fAreas.Insert(area); in _InsertAreaIntoReservedRegion()
519 uint32 addressSpec, size_t alignment, VMUserArea* area, in _InsertAreaSlot() argument
524 this, start, size, end, addressSpec, area)); in _InsertAreaSlot()
531 if (addressSpec == B_EXACT_ADDRESS && area->id != RESERVED_AREA_ID) { in _InsertAreaSlot()
533 status_t status = _InsertAreaIntoReservedRegion(start, size, area, in _InsertAreaSlot()
601 area->SetBase(alignedBase); in _InsertAreaSlot()
624 area->SetBase(alignedBase); in _InsertAreaSlot()
647 area->SetBase(alignedBase); in _InsertAreaSlot()
668 } else if (area->id != RESERVED_AREA_ID) { in _InsertAreaSlot()
690 area->SetBase(alignedBase); in _InsertAreaSlot()
713 area->SetBase(alignedBase); in _InsertAreaSlot()
744 area->SetBase(alignedBase); in _InsertAreaSlot()
760 area->SetBase(start); in _InsertAreaSlot()
772 fNextInsertHint = area->Base() + size; in _InsertAreaSlot()
774 area->SetSize(size); in _InsertAreaSlot()
775 fAreas.Insert(area); in _InsertAreaSlot()