diff options
| author | 2016-08-19 21:53:20 +0000 | |
|---|---|---|
| committer | 2016-08-19 21:53:20 +0000 | |
| commit | 679e38bad57c70a47ededd4dfcde178c7b3969ff (patch) | |
| tree | 5f5a219959e1cef0df8f99ea7f75df2c70ac197d | |
| parent | 75214833572bcdebd498f566212b9240cdd66fcf (diff) | |
| parent | 9210ce973ea180f6c5109f262068d433b1da5bc0 (diff) | |
Merge "ART: Fixing build breakage."
| -rw-r--r-- | runtime/mirror/dex_cache.h | 2 | ||||
| -rw-r--r-- | runtime/utils/dex_cache_arrays_layout-inl.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h index e04bde04b4..770c45d558 100644 --- a/runtime/mirror/dex_cache.h +++ b/runtime/mirror/dex_cache.h @@ -35,7 +35,7 @@ namespace mirror { 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} ... ] diff --git a/runtime/utils/dex_cache_arrays_layout-inl.h b/runtime/utils/dex_cache_arrays_layout-inl.h index 4752a86522..c2b2f657f8 100644 --- a/runtime/utils/dex_cache_arrays_layout-inl.h +++ b/runtime/utils/dex_cache_arrays_layout-inl.h @@ -50,7 +50,7 @@ inline constexpr size_t DexCacheArraysLayout::Alignment() { // 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> @@ -100,7 +100,7 @@ inline size_t DexCacheArraysLayout::StringsSize(size_t num_elements) const { } inline size_t DexCacheArraysLayout::StringsAlignment() const { - return alignof(uint64_t); + return alignof(mirror::StringDexCacheType); } inline size_t DexCacheArraysLayout::FieldOffset(uint32_t field_idx) const { |