ReaderMutexLock mu(Thread::Current(), *Locks::mutator_lock_);
ReaderMutexLock mu2(Thread::Current(), *Locks::classlinker_classes_lock_); // Check if the arena was already implicitly reused by boot classloader. if (Runtime::Current()->GetLinearAlloc()->Contains(ptr)) { return;
}
// Check if the arena was already implicitly reused by some other classloader.
FindPointerAllocatorVisitor visitor(ptr);
Runtime::Current()->GetClassLinker()->VisitAllocators(&visitor); if (visitor.is_found) { return;
}
// The arena was not reused yet. Do it explicitly. // Create a new allocation and use it to request new arenas until one of them is // a reused one that covers the art_method pointer.
std::unique_ptr<LinearAlloc> alloc(Runtime::Current()->CreateLinearAlloc()); do { // Ask for a word - it's sufficient to get an arena.
alloc->Alloc(Thread::Current(), sizeof(void*), LinearAllocKind::kNoGCRoots);
} while (!alloc->Contains(ptr));
}
} // namespace
} // namespace art
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.