< prev index next >

src/hotspot/share/prims/jvmtiTagMap.cpp

Print this page

        

@@ -176,10 +176,12 @@
     }
   }
 
   // hash a given key (oop) with the specified size
   static unsigned int hash(oop key, int size) {
+    ZGC_ONLY(assert(ZAddressMetadataShift >= sizeof(unsigned int) * BitsPerByte, "cast removes the metadata bits");)
+
     // shift right to get better distribution (as these bits will be zero
     // with aligned addresses)
     unsigned int addr = (unsigned int)(cast_from_oop<intptr_t>(key));
 #ifdef _LP64
     return (addr >> 3) % size;
< prev index next >