Lines Matching refs:space
174 space::LargeObjectSpaceType large_object_space_type, in Heap()
318 if (space::ImageSpace::LoadBootImage(image_file_name, in Heap()
322 for (auto space : boot_image_spaces_) { in Heap() local
323 AddSpace(space); in Heap()
424 non_moving_space_ = space::DlMallocSpace::CreateFromMemMap( in Heap()
435 MemMap* region_space_mem_map = space::RegionSpace::CreateMemMap(kRegionSpaceName, in Heap()
439 region_space_ = space::RegionSpace::Create(kRegionSpaceName, region_space_mem_map); in Heap()
446 bump_pointer_space_ = space::BumpPointerSpace::CreateFromMemMap("Bump pointer space 1", in Heap()
450 temp_space_ = space::BumpPointerSpace::CreateFromMemMap("Bump pointer space 2", in Heap()
467 bump_pointer_space_ = space::BumpPointerSpace::Create("Bump pointer space 1", in Heap()
471 temp_space_ = space::BumpPointerSpace::Create("Bump pointer space 2", in Heap()
487 if (large_object_space_type == space::LargeObjectSpaceType::kFreeList) { in Heap()
488 large_object_space_ = space::FreeListSpace::Create("free list large object space", nullptr, in Heap()
491 } else if (large_object_space_type == space::LargeObjectSpaceType::kMap) { in Heap()
492 large_object_space_ = space::LargeObjectMapSpace::Create("mem map large object space"); in Heap()
531 for (space::ImageSpace* image_space : GetBootImageSpaces()) { in Heap()
616 space::ImageSpace* first_space = nullptr; in Heap()
617 for (space::ImageSpace* space : boot_image_spaces_) { in Heap()
618 if (first_space == nullptr || space->Begin() < first_space->Begin()) { in Heap()
619 first_space = space; in Heap()
660 space::MallocSpace* Heap::CreateMallocSpaceFromMemMap(MemMap* mem_map, in CreateMallocSpaceFromMemMap()
666 space::MallocSpace* malloc_space = nullptr; in CreateMallocSpaceFromMemMap()
669 malloc_space = space::RosAllocSpace::CreateFromMemMap(mem_map, name, kDefaultStartingSize, in CreateMallocSpaceFromMemMap()
673 malloc_space = space::DlMallocSpace::CreateFromMemMap(mem_map, name, kDefaultStartingSize, in CreateMallocSpaceFromMemMap()
758 for (const auto& space : continuous_spaces_) { in IsCompilingBoot() local
759 if (space->IsImageSpace() || space->IsZygoteSpace()) { in IsCompilingBoot()
905 space::ContinuousSpace* space1 = main_space_ != nullptr ? main_space_ : non_moving_space_; in MarkAllocStackAsLive()
906 space::ContinuousSpace* space2 = non_moving_space_; in MarkAllocStackAsLive()
919 void Heap::AddSpace(space::Space* space) { in AddSpace() argument
920 CHECK(space != nullptr); in AddSpace()
922 if (space->IsContinuousSpace()) { in AddSpace()
923 DCHECK(!space->IsDiscontinuousSpace()); in AddSpace()
924 space::ContinuousSpace* continuous_space = space->AsContinuousSpace(); in AddSpace()
930 if (live_bitmap != nullptr && !space->IsRegionSpace()) { in AddSpace()
938 [](const space::ContinuousSpace* a, const space::ContinuousSpace* b) { in AddSpace()
942 CHECK(space->IsDiscontinuousSpace()); in AddSpace()
943 space::DiscontinuousSpace* discontinuous_space = space->AsDiscontinuousSpace(); in AddSpace()
948 if (space->IsAllocSpace()) { in AddSpace()
949 alloc_spaces_.push_back(space->AsAllocSpace()); in AddSpace()
953 void Heap::SetSpaceAsDefault(space::ContinuousSpace* continuous_space) { in SetSpaceAsDefault()
962 void Heap::RemoveSpace(space::Space* space) { in RemoveSpace() argument
963 DCHECK(space != nullptr); in RemoveSpace()
965 if (space->IsContinuousSpace()) { in RemoveSpace()
966 DCHECK(!space->IsDiscontinuousSpace()); in RemoveSpace()
967 space::ContinuousSpace* continuous_space = space->AsContinuousSpace(); in RemoveSpace()
971 if (live_bitmap != nullptr && !space->IsRegionSpace()) { in RemoveSpace()
980 DCHECK(space->IsDiscontinuousSpace()); in RemoveSpace()
981 space::DiscontinuousSpace* discontinuous_space = space->AsDiscontinuousSpace(); in RemoveSpace()
989 if (space->IsAllocSpace()) { in RemoveSpace()
990 auto it = std::find(alloc_spaces_.begin(), alloc_spaces_.end(), space->AsAllocSpace()); in RemoveSpace()
1154 space::ContinuousSpace* Heap::FindContinuousSpaceFromAddress(const mirror::Object* addr) const { in FindContinuousSpaceFromAddress()
1155 for (const auto& space : continuous_spaces_) { in FindContinuousSpaceFromAddress() local
1156 if (space->Contains(addr)) { in FindContinuousSpaceFromAddress()
1157 return space; in FindContinuousSpaceFromAddress()
1163 space::ContinuousSpace* Heap::FindContinuousSpaceFromObject(ObjPtr<mirror::Object> obj, in FindContinuousSpaceFromObject()
1165 space::ContinuousSpace* space = FindContinuousSpaceFromAddress(obj.Ptr()); in FindContinuousSpaceFromObject() local
1166 if (space != nullptr) { in FindContinuousSpaceFromObject()
1167 return space; in FindContinuousSpaceFromObject()
1175 space::DiscontinuousSpace* Heap::FindDiscontinuousSpaceFromObject(ObjPtr<mirror::Object> obj, in FindDiscontinuousSpaceFromObject()
1177 for (const auto& space : discontinuous_spaces_) { in FindDiscontinuousSpaceFromObject() local
1178 if (space->Contains(obj.Ptr())) { in FindDiscontinuousSpaceFromObject()
1179 return space; in FindDiscontinuousSpaceFromObject()
1188 space::Space* Heap::FindSpaceFromObject(ObjPtr<mirror::Object> obj, bool fail_ok) const { in FindSpaceFromObject()
1189 space::Space* result = FindContinuousSpaceFromObject(obj, true); in FindSpaceFromObject()
1196 space::Space* Heap::FindSpaceFromAddress(const void* addr) const { in FindSpaceFromAddress()
1197 for (const auto& space : continuous_spaces_) { in FindSpaceFromAddress() local
1198 if (space->Contains(reinterpret_cast<const mirror::Object*>(addr))) { in FindSpaceFromAddress()
1199 return space; in FindSpaceFromAddress()
1202 for (const auto& space : discontinuous_spaces_) { in FindSpaceFromAddress() local
1203 if (space->Contains(reinterpret_cast<const mirror::Object*>(addr))) { in FindSpaceFromAddress()
1204 return space; in FindSpaceFromAddress()
1227 space::AllocSpace* space = nullptr; in ThrowOutOfMemoryError() local
1229 space = non_moving_space_; in ThrowOutOfMemoryError()
1232 space = main_space_; in ThrowOutOfMemoryError()
1235 space = bump_pointer_space_; in ThrowOutOfMemoryError()
1238 space = region_space_; in ThrowOutOfMemoryError()
1240 if (space != nullptr) { in ThrowOutOfMemoryError()
1241 space->LogFragmentationAllocFailure(oss, byte_count); in ThrowOutOfMemoryError()
1346 for (const auto& space : continuous_spaces_) { in TrimSpaces() local
1347 if (space->IsMallocSpace()) { in TrimSpaces()
1348 gc::space::MallocSpace* malloc_space = space->AsMallocSpace(); in TrimSpaces()
1412 space::ContinuousSpace* c_space = FindContinuousSpaceFromObject(obj, true); in IsLiveObjectLocked()
1413 space::DiscontinuousSpace* d_space = nullptr; in IsLiveObjectLocked()
1473 for (const auto& space : continuous_spaces_) { in DumpSpaces() local
1474 accounting::ContinuousSpaceBitmap* live_bitmap = space->GetLiveBitmap(); in DumpSpaces()
1475 accounting::ContinuousSpaceBitmap* mark_bitmap = space->GetMarkBitmap(); in DumpSpaces()
1476 stream << space << " " << *space << "\n"; in DumpSpaces()
1484 for (const auto& space : discontinuous_spaces_) { in DumpSpaces() local
1485 stream << space << " " << *space << "\n"; in DumpSpaces()
1554 space::RosAllocSpace* Heap::GetRosAllocSpace(gc::allocator::RosAlloc* rosalloc) const { in GetRosAllocSpace()
1558 for (const auto& space : continuous_spaces_) { in GetRosAllocSpace() local
1559 if (space->AsContinuousSpace()->IsRosAllocSpace()) { in GetRosAllocSpace()
1560 if (space->AsContinuousSpace()->AsRosAllocSpace()->GetRosAlloc() == rosalloc) { in GetRosAllocSpace()
1561 return space->AsContinuousSpace()->AsRosAllocSpace(); in GetRosAllocSpace()
1774 for (space::AllocSpace* space : alloc_spaces_) { in GetObjectsAllocated()
1775 total += space->GetObjectsAllocated(); in GetObjectsAllocated()
1920 space::MallocSpace* to_space = main_space_backup_.release(); in PerformHomogeneousSpaceCompact()
1921 space::MallocSpace* from_space = main_space_; in PerformHomogeneousSpaceCompact()
2015 bump_pointer_space_ = space::BumpPointerSpace::CreateFromMemMap("Bump pointer space", in TransitionCollector()
2035 temp_space_ = space::BumpPointerSpace::CreateFromMemMap("Bump pointer space 2", in TransitionCollector()
2178 void BuildBins(space::ContinuousSpace* space) REQUIRES_SHARED(Locks::mutator_lock_) { in BuildBins() argument
2179 bin_live_bitmap_ = space->GetLiveBitmap(); in BuildBins()
2180 bin_mark_bitmap_ = space->GetMarkBitmap(); in BuildBins()
2181 uintptr_t prev = reinterpret_cast<uintptr_t>(space->Begin()); in BuildBins()
2193 AddBin(reinterpret_cast<uintptr_t>(space->End()) - prev, prev); in BuildBins()
2214 virtual bool ShouldSweepSpace(space::ContinuousSpace* space ATTRIBUTE_UNUSED) const { in ShouldSweepSpace()
2262 for (const auto& space : GetContinuousSpaces()) { in UnBindBitmaps() local
2263 if (space->IsContinuousMemMapAllocSpace()) { in UnBindBitmaps()
2264 space::ContinuousMemMapAllocSpace* alloc_space = space->AsContinuousMemMapAllocSpace(); in UnBindBitmaps()
2301 space::BumpPointerSpace target_space("zygote bump space", non_moving_space_->End(), in PreZygoteFork()
2327 space::Space* old_main_space = main_space_; in PreZygoteFork()
2354 space::MallocSpace* old_alloc_space = non_moving_space_; in PreZygoteFork()
2468 collector::GarbageCollector* Heap::Compact(space::ContinuousMemMapAllocSpace* target_space, in Compact()
2469 space::ContinuousMemMapAllocSpace* source_space, in Compact()
2820 space::ContinuousSpace* ref_space = heap_->FindContinuousSpaceFromObject(ref, true); in VerifyReference()
2822 space::MallocSpace* space = ref_space->AsMallocSpace(); in VerifyReference() local
2823 mirror::Class* ref_class = space->FindRecentFreedObject(ref); in VerifyReference()
3149 accounting::ModUnionTable* Heap::FindModUnionTableFromSpace(space::Space* space) { in FindModUnionTableFromSpace() argument
3150 auto it = mod_union_tables_.find(space); in FindModUnionTableFromSpace()
3157 accounting::RememberedSet* Heap::FindRememberedSetFromSpace(space::Space* space) { in FindRememberedSetFromSpace() argument
3158 auto it = remembered_sets_.find(space); in FindRememberedSetFromSpace()
3171 for (const auto& space : continuous_spaces_) { in ProcessCards() local
3172 accounting::ModUnionTable* table = FindModUnionTableFromSpace(space); in ProcessCards()
3173 accounting::RememberedSet* rem_set = FindRememberedSetFromSpace(space); in ProcessCards()
3175 const char* name = space->IsZygoteSpace() ? "ZygoteModUnionClearCards" : in ProcessCards()
3187 uint8_t* end = space->End(); in ProcessCards()
3188 if (space->IsImageSpace()) { in ProcessCards()
3193 card_table_->ClearCardRange(space->Begin(), end); in ProcessCards()
3202 card_table_->ModifyCardsAtomic(space->Begin(), space->End(), AgeCardVisitor(), in ProcessCards()
3328 for (const auto& space : continuous_spaces_) { in RosAllocVerification() local
3329 if (space->IsRosAllocSpace()) { in RosAllocVerification()
3330 VLOG(heap) << name << " : " << space->GetName(); in RosAllocVerification()
3331 space->AsRosAllocSpace()->Verify(); in RosAllocVerification()
3405 space::Space* space = FindContinuousSpaceFromObject(obj.Ptr(), true); in IsMovableObject() local
3406 if (space != nullptr) { in IsMovableObject()
3408 return space->CanMoveObjects(); in IsMovableObject()
3517 for (const auto& space : continuous_spaces_) { in ClampGrowthLimit() local
3518 if (space->IsMallocSpace()) { in ClampGrowthLimit()
3519 gc::space::MallocSpace* malloc_space = space->AsMallocSpace(); in ClampGrowthLimit()
3532 for (const auto& space : continuous_spaces_) { in ClearGrowthLimit() local
3533 if (space->IsMallocSpace()) { in ClearGrowthLimit()
3534 gc::space::MallocSpace* malloc_space = space->AsMallocSpace(); in ClearGrowthLimit()
3867 space::Space* space = remembered_set->GetSpace(); in AddRememberedSet() local
3868 CHECK(space != nullptr); in AddRememberedSet()
3869 CHECK(remembered_sets_.find(space) == remembered_sets_.end()) << space; in AddRememberedSet()
3870 remembered_sets_.Put(space, remembered_set); in AddRememberedSet()
3871 CHECK(remembered_sets_.find(space) != remembered_sets_.end()) << space; in AddRememberedSet()
3874 void Heap::RemoveRememberedSet(space::Space* space) { in RemoveRememberedSet() argument
3875 CHECK(space != nullptr); in RemoveRememberedSet()
3876 auto it = remembered_sets_.find(space); in RemoveRememberedSet()
3880 CHECK(remembered_sets_.find(space) == remembered_sets_.end()); in RemoveRememberedSet()
3885 for (const auto& space : GetContinuousSpaces()) { in ClearMarkedObjects() local
3886 accounting::ContinuousSpaceBitmap* mark_bitmap = space->GetMarkBitmap(); in ClearMarkedObjects()
3887 if (space->GetLiveBitmap() != mark_bitmap) { in ClearMarkedObjects()
3892 for (const auto& space : GetDiscontinuousSpaces()) { in ClearMarkedObjects() local
3893 space->GetMarkBitmap()->Clear(); in ClearMarkedObjects()
3984 for (gc::space::ImageSpace* space : boot_image_spaces_) { in ObjectIsInBootImageSpace()
3985 if (space->HasAddress(obj.Ptr())) { in ObjectIsInBootImageSpace()
3993 for (gc::space::ImageSpace* space : boot_image_spaces_) { in IsInBootImageOatFile()
3994 if (space->GetOatFile()->Contains(p)) { in IsInBootImageOatFile()
4013 for (gc::space::ImageSpace* space_ : GetBootImageSpaces()) { in GetBootImagesSize()
4090 if (space::RegionSpace::kRegionSize >= alloc_size) { in AllocWithNewTLAB()
4093 space::RegionSpace::kRegionSize, in AllocWithNewTLAB()
4097 : gc::space::RegionSpace::kRegionSize; in AllocWithNewTLAB()