summaryrefslogtreecommitdiffstats
path: root/runtime/class_linker-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker-inl.h')
-rw-r--r--runtime/class_linker-inl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/class_linker-inl.h b/runtime/class_linker-inl.h
index d05f7af87..130654680 100644
--- a/runtime/class_linker-inl.h
+++ b/runtime/class_linker-inl.h
@@ -155,6 +155,11 @@ inline mirror::ArtField* ClassLinker::ResolveField(uint32_t field_idx, mirror::A
return resolved_field;
}
+inline mirror::Object* ClassLinker::AllocObject(Thread* self) {
+ return GetClassRoot(kJavaLangObject)->Alloc<false, false>(self,
+ Runtime::Current()->GetHeap()->GetCurrentAllocator());
+}
+
template <class T>
inline mirror::ObjectArray<T>* ClassLinker::AllocObjectArray(Thread* self, size_t length) {
return mirror::ObjectArray<T>::Alloc(self, GetClassRoot(kObjectArrayClass), length);