Lines Matching refs:next

227 	VMUserArea* next = fAreas.Next(static_cast<VMUserArea*>(area));
230 if (next == NULL)
233 if (next->Base() > newEnd)
240 return next->id == RESERVED_AREA_ID
241 && (uint64)next->cache_offset <= (uint64)area->Base()
242 && next->Base() + (next->Size() - 1) >= newEnd;
253 VMUserArea* next = fAreas.Next(area);
254 if (next != NULL && next->Base() <= newEnd) {
255 if (next->id != RESERVED_AREA_ID
256 || (uint64)next->cache_offset > (uint64)area->Base()
257 || next->Base() + (next->Size() - 1) < newEnd) {
264 addr_t offset = area->Base() + newSize - next->Base();
265 if (next->Size() <= offset) {
266 RemoveArea(next, allocationFlags);
267 next->~VMUserArea();
268 free_etc(next, allocationFlags);
270 status_t error = ShrinkAreaHead(next, next->Size() - offset,
546 // align the memory to the next power of two of the size
568 VMUserArea* next = fAreas.FindClosest(start + size, false);
569 VMUserArea* last = next != NULL
570 ? fAreas.Previous(next) : fAreas.FindClosest(start + size, true);
573 // will be inserted directly after "last" ("next" is not referenced anymore)
585 next != NULL ? next : fAreas.LeftMost());
591 addr_t nextBase = next == NULL
592 ? end : std::min(next->Base() - 1, end);
605 last = next;
606 next = it.Next();
610 while (next != NULL && next->Base() + next->Size() - 1 <= end) {
613 addr_t nextBase = std::min(end, next->Base() - 1);
628 last = next;
629 next = it.Next();
638 if (next == NULL && is_valid_spot(last->Base() + (last->Size() - 1),
673 next = it.Next();
674 for (last = NULL; next != NULL; next = it.Next()) {
675 if (next->id != RESERVED_AREA_ID) {
676 last = next;
678 } else if (next->Base() + size - 1 > end)
683 addr_t alignedBase = align_address(next->Base(), alignment);
684 if (next->Base() == alignedBase && next->Size() == size) {
687 fAreas.Remove(next);
691 next->~VMUserArea();
692 free_etc(next, allocationFlags);
696 if ((next->protection & RESERVED_AVOID_BASE) == 0
697 && alignedBase == next->Base()
698 && next->Size() >= size) {
700 next->Base() + next->Size() - size, end);
702 alignedBase = _RandomizeAddress(next->Base(),
705 addr_t offset = alignedBase - next->Base();
711 next->SetBase(next->Base() + offset + size);
712 next->SetSize(next->Size() - offset - size);
717 if (is_valid_spot(next->Base(), alignedBase, size,
718 std::min(next->Base() + next->Size() - 1, end))) {
724 addr_t alignedNextBase = align_address(next->Base(),
727 addr_t startRange = next->Base() + next->Size();
733 = std::min(next->Base() + next->Size() - size,
739 next->Base() + next->Size() - size, alignment);
743 next->SetSize(alignedBase - next->Base());
748 last = next;
758 && (next == NULL || next->Base() > start + (size - 1))) {