Lines Matching refs:run

503   Run* run = nullptr;  in FreeInternal()  local
526 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in FreeInternal()
527 DCHECK_EQ(run->magic_num_, kMagicNum); in FreeInternal()
539 DCHECK(run != nullptr); in FreeInternal()
540 return FreeFromRun(self, ptr, run); in FreeInternal()
759 size_t RosAlloc::FreeFromRun(Thread* self, void* ptr, Run* run) { in FreeFromRun() argument
760 DCHECK_EQ(run->magic_num_, kMagicNum); in FreeFromRun()
761 DCHECK_LT(run, ptr); in FreeFromRun()
762 DCHECK_LT(ptr, run->End()); in FreeFromRun()
763 const size_t idx = run->size_bracket_idx_; in FreeFromRun()
768 run_was_full = run->IsFull(); in FreeFromRun()
773 if (LIKELY(run->IsThreadLocal())) { in FreeFromRun()
775 DCHECK_LT(run->size_bracket_idx_, kNumThreadLocalSizeBrackets); in FreeFromRun()
776 DCHECK(non_full_runs_[idx].find(run) == non_full_runs_[idx].end()); in FreeFromRun()
777 DCHECK(full_runs_[idx].find(run) == full_runs_[idx].end()); in FreeFromRun()
778 run->AddToThreadLocalFreeList(ptr); in FreeFromRun()
781 << reinterpret_cast<intptr_t>(run); in FreeFromRun()
787 run->FreeSlot(ptr); in FreeFromRun()
789 if (run->IsAllFree()) { in FreeFromRun()
791 std::set<Run*>::iterator pos = non_full_runs->find(run); in FreeFromRun()
796 << reinterpret_cast<intptr_t>(run) << " from non_full_runs_"; in FreeFromRun()
799 if (run == current_runs_[idx]) { in FreeFromRun()
802 DCHECK(non_full_runs_[idx].find(run) == non_full_runs_[idx].end()); in FreeFromRun()
803 DCHECK(full_runs_[idx].find(run) == full_runs_[idx].end()); in FreeFromRun()
804 run->ZeroHeaderAndSlotHeaders(); in FreeFromRun()
807 FreePages(self, run, true); in FreeFromRun()
813 if (run != current_runs_[idx]) { in FreeFromRun()
815 auto pos = non_full_runs->find(run); in FreeFromRun()
818 DCHECK(full_runs->find(run) != full_runs->end()); in FreeFromRun()
820 full_runs->erase(run); in FreeFromRun()
823 << reinterpret_cast<intptr_t>(run) << " from full_runs_"; in FreeFromRun()
826 non_full_runs->insert(run); in FreeFromRun()
827 DCHECK(!run->IsFull()); in FreeFromRun()
830 << reinterpret_cast<intptr_t>(run) in FreeFromRun()
1030 Run* run = nullptr; in BulkFree() local
1040 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in BulkFree()
1048 run = reinterpret_cast<Run*>(base_ + pi * kPageSize); in BulkFree()
1067 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in BulkFree()
1075 run = reinterpret_cast<Run*>(base_ + pi * kPageSize); in BulkFree()
1083 DCHECK(run != nullptr); in BulkFree()
1084 DCHECK_EQ(run->magic_num_, kMagicNum); in BulkFree()
1086 freed_bytes += run->AddToBulkFreeList(ptr); in BulkFree()
1088 if (!run->to_be_bulk_freed_) { in BulkFree()
1089 run->to_be_bulk_freed_ = true; in BulkFree()
1090 runs.push_back(run); in BulkFree()
1093 runs.insert(run); in BulkFree()
1101 for (Run* run : runs) { in BulkFree()
1103 DCHECK(run->to_be_bulk_freed_); in BulkFree()
1104 run->to_be_bulk_freed_ = false; in BulkFree()
1106 size_t idx = run->size_bracket_idx_; in BulkFree()
1108 if (run->IsThreadLocal()) { in BulkFree()
1109 DCHECK_LT(run->size_bracket_idx_, kNumThreadLocalSizeBrackets); in BulkFree()
1110 DCHECK(non_full_runs_[idx].find(run) == non_full_runs_[idx].end()); in BulkFree()
1111 DCHECK(full_runs_[idx].find(run) == full_runs_[idx].end()); in BulkFree()
1112 run->MergeBulkFreeListToThreadLocalFreeList(); in BulkFree()
1115 << std::hex << reinterpret_cast<intptr_t>(run); in BulkFree()
1117 DCHECK(run->IsThreadLocal()); in BulkFree()
1121 bool run_was_full = run->IsFull(); in BulkFree()
1122 run->MergeBulkFreeListToFreeList(); in BulkFree()
1125 << reinterpret_cast<intptr_t>(run); in BulkFree()
1131 if (run->IsAllFree()) { in BulkFree()
1134 bool run_was_current = run == current_runs_[idx]; in BulkFree()
1136 DCHECK(full_runs->find(run) == full_runs->end()); in BulkFree()
1137 DCHECK(non_full_runs->find(run) == non_full_runs->end()); in BulkFree()
1143 std::unordered_set<Run*, hash_run, eq_run>::iterator pos = full_runs->find(run); in BulkFree()
1148 << reinterpret_cast<intptr_t>(run) in BulkFree()
1151 DCHECK(full_runs->find(run) == full_runs->end()); in BulkFree()
1155 DCHECK(full_runs->find(run) == full_runs->end()); in BulkFree()
1156 DCHECK(non_full_runs->find(run) != non_full_runs->end()); in BulkFree()
1157 non_full_runs->erase(run); in BulkFree()
1160 << reinterpret_cast<intptr_t>(run) in BulkFree()
1163 DCHECK(non_full_runs->find(run) == non_full_runs->end()); in BulkFree()
1166 run->ZeroHeaderAndSlotHeaders(); in BulkFree()
1168 FreePages(self, run, true); in BulkFree()
1174 if (run == current_runs_[idx]) { in BulkFree()
1175 DCHECK(non_full_runs->find(run) == non_full_runs->end()); in BulkFree()
1176 DCHECK(full_runs->find(run) == full_runs->end()); in BulkFree()
1181 DCHECK(full_runs->find(run) != full_runs->end()); in BulkFree()
1182 DCHECK(non_full_runs->find(run) == non_full_runs->end()); in BulkFree()
1184 full_runs->erase(run); in BulkFree()
1187 << reinterpret_cast<intptr_t>(run) in BulkFree()
1191 non_full_runs->insert(run); in BulkFree()
1194 << reinterpret_cast<intptr_t>(run) in BulkFree()
1199 DCHECK(full_runs->find(run) == full_runs->end()); in BulkFree()
1200 DCHECK(non_full_runs->find(run) != non_full_runs->end()); in BulkFree()
1276 Run* run = reinterpret_cast<Run*>(base_ + i * kPageSize); in DumpPageMap() local
1277 size_t idx = run->size_bracket_idx_; in DumpPageMap()
1281 << " is_thread_local=" << run->is_thread_local_ in DumpPageMap()
1282 << " is_all_free=" << (run->IsAllFree() ? 1 : 0) in DumpPageMap()
1333 Run* run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in UsableSize() local
1334 DCHECK_EQ(run->magic_num_, kMagicNum); in UsableSize()
1335 size_t idx = run->size_bracket_idx_; in UsableSize()
1337 - (reinterpret_cast<uint8_t*>(run) + headerSizes[idx]); in UsableSize()
1461 Run* run = reinterpret_cast<Run*>(base_ + i * kPageSize); in InspectAll() local
1462 DCHECK_EQ(run->magic_num_, kMagicNum); in InspectAll()
1465 run->InspectAllSlots(handler, arg); in InspectAll()
1466 size_t num_pages = numOfPages[run->size_bracket_idx_]; in InspectAll()
1543 void RosAlloc::RevokeRun(Thread* self, size_t idx, Run* run) { in RevokeRun() argument
1545 DCHECK(run != dedicated_full_run_); in RevokeRun()
1546 if (run->IsFull()) { in RevokeRun()
1548 full_runs_[idx].insert(run); in RevokeRun()
1549 DCHECK(full_runs_[idx].find(run) != full_runs_[idx].end()); in RevokeRun()
1552 << reinterpret_cast<intptr_t>(run) in RevokeRun()
1556 } else if (run->IsAllFree()) { in RevokeRun()
1557 run->ZeroHeaderAndSlotHeaders(); in RevokeRun()
1559 FreePages(self, run, true); in RevokeRun()
1561 non_full_runs_[idx].insert(run); in RevokeRun()
1562 DCHECK(non_full_runs_[idx].find(run) != non_full_runs_[idx].end()); in RevokeRun()
1565 << reinterpret_cast<intptr_t>(run) in RevokeRun()
1814 Run* run = reinterpret_cast<Run*>(base_ + i * kPageSize); in Verify() local
1815 DCHECK_EQ(run->magic_num_, kMagicNum); in Verify()
1816 size_t idx = run->size_bracket_idx_; in Verify()
1829 runs.push_back(run); in Verify()
1865 for (auto& run : runs) { in Verify() local
1866 run->Verify(self, this, is_running_on_memory_tool_); in Verify()
2142 Run* run = reinterpret_cast<Run*>(base_ + i * kPageSize); in DumpStats() local
2143 size_t idx = run->size_bracket_idx_; in DumpStats()
2148 size_t num_free_slots = run->NumberOfFreeSlots(); in DumpStats()