hotspot/src/share/vm/oops/oop.inline.hpp
changeset 36572 bdbf53032b6a
parent 35877 a2a62511d0f8
child 37480 291ee208fb72
--- a/hotspot/src/share/vm/oops/oop.inline.hpp	Sun Mar 06 19:07:57 2016 -0500
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp	Mon Mar 07 10:36:50 2016 +0300
@@ -295,7 +295,7 @@
 // in inner GC loops so these are separated.
 
 inline bool check_obj_alignment(oop obj) {
-  return cast_from_oop<intptr_t>(obj) % MinObjAlignmentInBytes == 0;
+  return (cast_from_oop<intptr_t>(obj) & MinObjAlignmentInBytesMask) == 0;
 }
 
 oop oopDesc::decode_heap_oop_not_null(narrowOop v) {