diff options
Diffstat (limited to 'runtime/art_method.h')
| -rw-r--r-- | runtime/art_method.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/art_method.h b/runtime/art_method.h index 85c03ed5e7..8221fe28a2 100644 --- a/runtime/art_method.h +++ b/runtime/art_method.h @@ -513,6 +513,13 @@ class ArtMethod FINAL { (sizeof(PtrSizedFields) / sizeof(void*)) * pointer_size; } + // Alignment of an instance of this object. + static size_t ObjectAlignment(size_t pointer_size) { + // The ArtMethod alignment is the same as image pointer size. This differs from + // alignof(ArtMethod) if cross-compiling with image_pointer_size_ != sizeof(void*). + return pointer_size; + } + void CopyFrom(const ArtMethod* src, size_t image_pointer_size) SHARED_REQUIRES(Locks::mutator_lock_); |