Fix incorrect initial dex cache size.
We were previously setting it to be sizeof(DexCacheClass) instead
of sizeof(DexCache). This was causing some problems with
compaction when I relied on the object sizes being accurate to
visit objects in the bump pointer space.
Bug: 8981901
Change-Id: Iede04763aced041986b1b239368fc867143ad70d
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index e659108..e460a8d 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -247,6 +247,7 @@
} else {
result = GetClass()->GetObjectSize();
}
+ DCHECK_GE(result, sizeof(Object)) << " class=" << PrettyTypeOf(GetClass());
DCHECK(!IsArtField() || result == sizeof(ArtField));
DCHECK(!IsArtMethod() || result == sizeof(ArtMethod));
return result;