Add default template args to Heap::Alloc*Object*().
Namely kInstrumented=true and kCheckLargeObject=true.
This is a follow-up after
https://android-review.googlesource.com/963693
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I6c23e76f90f1892382c3bb8c331d12437bc23f89
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 333025e..b980a97 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -467,7 +467,7 @@
// Allocate the object as non-movable so that there are no cases where Object::IsClass returns
// the incorrect result when comparing to-space vs from-space.
Handle<mirror::Class> java_lang_Class(hs.NewHandle(ObjPtr<mirror::Class>::DownCast(
- heap->AllocNonMovableObject<true>(self, nullptr, class_class_size, VoidFunctor()))));
+ heap->AllocNonMovableObject(self, nullptr, class_class_size, VoidFunctor()))));
CHECK(java_lang_Class != nullptr);
java_lang_Class->SetClassFlags(mirror::kClassFlagClass);
java_lang_Class->SetClass(java_lang_Class.Get());
@@ -496,10 +496,10 @@
java_lang_Object->SetObjectSize(sizeof(mirror::Object));
// Allocate in non-movable so that it's possible to check if a JNI weak global ref has been
// cleared without triggering the read barrier and unintentionally mark the sentinel alive.
- runtime->SetSentinel(heap->AllocNonMovableObject<true>(self,
- java_lang_Object.Get(),
- java_lang_Object->GetObjectSize(),
- VoidFunctor()));
+ runtime->SetSentinel(heap->AllocNonMovableObject(self,
+ java_lang_Object.Get(),
+ java_lang_Object->GetObjectSize(),
+ VoidFunctor()));
// Initialize the SubtypeCheck bitstring for java.lang.Object and java.lang.Class.
if (kBitstringSubtypeCheckEnabled) {
@@ -1064,7 +1064,7 @@
java_lang_Object->SetObjectSize(sizeof(mirror::Object));
// Allocate in non-movable so that it's possible to check if a JNI weak global ref has been
// cleared without triggering the read barrier and unintentionally mark the sentinel alive.
- runtime->SetSentinel(heap->AllocNonMovableObject<true>(
+ runtime->SetSentinel(heap->AllocNonMovableObject(
self, java_lang_Object, java_lang_Object->GetObjectSize(), VoidFunctor()));
const std::vector<std::string>& boot_class_path_locations = runtime->GetBootClassPathLocations();
@@ -2561,8 +2561,8 @@
gc::Heap* heap = Runtime::Current()->GetHeap();
mirror::Class::InitializeClassVisitor visitor(class_size);
ObjPtr<mirror::Object> k = (kMovingClasses && kMovable) ?
- heap->AllocObject<true>(self, java_lang_Class, class_size, visitor) :
- heap->AllocNonMovableObject<true>(self, java_lang_Class, class_size, visitor);
+ heap->AllocObject(self, java_lang_Class, class_size, visitor) :
+ heap->AllocNonMovableObject(self, java_lang_Class, class_size, visitor);
if (UNLIKELY(k == nullptr)) {
self->AssertPendingOOMException();
return nullptr;