Add inline to RosAlloc::AllocFromCurrentRunUnlocked().
This appears to make MemAllocTest faster by up to ~200 ms.
Bug: 14493155
Bug: 9986565
Change-Id: I1b8ba1f3cecfa9e5b6fdc53f3ae00450be6023a8
diff --git a/runtime/gc/allocator/rosalloc.cc b/runtime/gc/allocator/rosalloc.cc
index f113030..a693659 100644
--- a/runtime/gc/allocator/rosalloc.cc
+++ b/runtime/gc/allocator/rosalloc.cc
@@ -584,7 +584,7 @@
return AllocRun(self, idx);
}
-void* RosAlloc::AllocFromCurrentRunUnlocked(Thread* self, size_t idx) {
+inline void* RosAlloc::AllocFromCurrentRunUnlocked(Thread* self, size_t idx) {
Run* current_run = current_runs_[idx];
DCHECK(current_run != nullptr);
void* slot_addr = current_run->AllocSlot();