class String;
-struct StringDexCachePair {
+struct PACKED(8) StringDexCachePair {
GcRoot<String> string_pointer;
uint32_t string_index;
// The array is initially [ {0,0}, {0,0}, {0,0} ... ]
// GcRoot<> alignment is 4, i.e. lower than or equal to the pointer alignment.
static_assert(alignof(GcRoot<mirror::Class>) == 4, "Expecting alignof(GcRoot<>) == 4");
static_assert(alignof(mirror::StringDexCacheType) == 8, "Expecting alignof(StringDexCacheType) == 8");
- return sizeof(mirror::StringDexCacheType);
+ return alignof(mirror::StringDexCacheType);
}
template <typename T>
}
inline size_t DexCacheArraysLayout::StringsAlignment() const {
- return alignof(uint64_t);
+ return alignof(mirror::StringDexCacheType);
}
inline size_t DexCacheArraysLayout::FieldOffset(uint32_t field_idx) const {