diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/gc_root.h | 2 | ||||
-rw-r--r-- | runtime/indirect_reference_table.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/runtime/gc_root.h b/runtime/gc_root.h index 7e0be64441..c5feda5407 100644 --- a/runtime/gc_root.h +++ b/runtime/gc_root.h @@ -71,7 +71,7 @@ class RootInfo { typedef void (RootCallback)(mirror::Object** root, void* arg, const RootInfo& root_info); template<class MirrorType> -class PACKED(4) GcRoot { +class GcRoot { public: template<ReadBarrierOption kReadBarrierOption = kWithReadBarrier> ALWAYS_INLINE MirrorType* Read() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 7f7870a412..576a60477e 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -197,7 +197,7 @@ union IRTSegmentState { // Contains multiple entries but only one active one, this helps us detect use after free errors // since the serial stored in the indirect ref wont match. static const size_t kIRTPrevCount = kIsDebugBuild ? 7 : 3; -class PACKED(4) IrtEntry { +class IrtEntry { public: void Add(mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { ++serial_; @@ -218,6 +218,8 @@ class PACKED(4) IrtEntry { uint32_t serial_; GcRoot<mirror::Object> references_[kIRTPrevCount]; }; +static_assert(sizeof(IrtEntry) == (1 + kIRTPrevCount) * sizeof(uintptr_t), + "Unexpected sizeof(IrtEntry)"); class IrtIterator { public: |