diff -r 272dff61a2de -r 77fb0be7d19f src/hotspot/share/oops/oopsHierarchy.hpp --- a/src/hotspot/share/oops/oopsHierarchy.hpp Fri Mar 23 12:55:39 2018 +0100 +++ b/src/hotspot/share/oops/oopsHierarchy.hpp Thu Mar 15 21:24:10 2018 +0100 @@ -192,6 +192,10 @@ return (T)(CHECK_UNHANDLED_OOPS_ONLY((void*))o); } +inline bool check_obj_alignment(oop obj) { + return (cast_from_oop(obj) & MinObjAlignmentInBytesMask) == 0; +} + // The metadata hierarchy is separate from the oop hierarchy // class MetaspaceObj