Lines Matching refs:pm_idx
304 size_t pm_idx = ToPageMapIndex(ptr); in FreePages() local
305 DCHECK_LT(pm_idx, page_map_size_); in FreePages()
306 uint8_t pm_type = page_map_[pm_idx]; in FreePages()
317 …LOG(FATAL) << "Unreachable - " << __PRETTY_FUNCTION__ << " : " << "pm_idx=" << pm_idx << ", pm_typ… in FreePages()
324 page_map_[pm_idx] = kPageMapEmpty; in FreePages()
325 size_t idx = pm_idx + 1; in FreePages()
363 … << std::hex << reinterpret_cast<uintptr_t>(fpr) << " [" << std::dec << pm_idx << "] -0x" in FreePages()
506 size_t pm_idx = RoundDownToPageMapIndex(ptr); in FreeInternal() local
510 DCHECK_LT(pm_idx, page_map_size_); in FreeInternal()
511 uint8_t page_map_entry = page_map_[pm_idx]; in FreeInternal()
513 … LOG(INFO) << "RosAlloc::FreeInternal() : " << std::hex << ptr << ", pm_idx=" << std::dec << pm_idx in FreeInternal()
516 switch (page_map_[pm_idx]) { in FreeInternal()
520 LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); in FreeInternal()
525 --pm_idx; in FreeInternal()
526 DCHECK_LT(pm_idx, capacity_ / kPageSize); in FreeInternal()
527 } while (page_map_[pm_idx] != kPageMapRun); in FreeInternal()
530 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in FreeInternal()
535 LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); in FreeInternal()
539 LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); in FreeInternal()
1033 size_t pm_idx = RoundDownToPageMapIndex(ptr); in BulkFree() local
1037 uint8_t page_map_entry = page_map_[pm_idx]; in BulkFree()
1040 << std::dec << pm_idx in BulkFree()
1044 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in BulkFree()
1046 size_t pi = pm_idx; in BulkFree()
1063 DCHECK_LT(pm_idx, page_map_size_); in BulkFree()
1064 uint8_t page_map_entry = page_map_[pm_idx]; in BulkFree()
1067 << std::dec << pm_idx in BulkFree()
1071 run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in BulkFree()
1073 size_t pi = pm_idx; in BulkFree()
1306 size_t pm_idx = RoundDownToPageMapIndex(ptr); in UsableSize() local
1308 switch (page_map_[pm_idx]) { in UsableSize()
1312 LOG(FATAL) << "Unreachable - " << __PRETTY_FUNCTION__ << ": pm_idx=" << pm_idx << ", ptr=" in UsableSize()
1317 size_t idx = pm_idx + 1; in UsableSize()
1326 LOG(FATAL) << "Unreachable - " << __PRETTY_FUNCTION__ << ": pm_idx=" << pm_idx << ", ptr=" in UsableSize()
1332 while (page_map_[pm_idx] != kPageMapRun) { in UsableSize()
1333 pm_idx--; in UsableSize()
1334 DCHECK_LT(pm_idx, capacity_ / kPageSize); in UsableSize()
1336 DCHECK_EQ(page_map_[pm_idx], kPageMapRun); in UsableSize()
1337 Run* run = reinterpret_cast<Run*>(base_ + pm_idx * kPageSize); in UsableSize()
1346 LOG(FATAL) << "Unreachable - page map type: " << static_cast<int>(page_map_[pm_idx]); in UsableSize()
2062 size_t pm_idx = ToPageMapIndex(start); in ReleasePageRange() local
2065 const size_t max_idx = pm_idx + (end - start) / kPageSize; in ReleasePageRange()
2066 for (; pm_idx < max_idx; ++pm_idx) { in ReleasePageRange()
2067 DCHECK(IsFreePage(pm_idx)); in ReleasePageRange()
2068 if (page_map_[pm_idx] == kPageMapEmpty) { in ReleasePageRange()
2071 page_map_[pm_idx] = kPageMapReleased; in ReleasePageRange()