< prev index next >

src/hotspot/share/gc/z/zHeapIterator.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -121,17 +121,17 @@
     delete map;
   }
 }
 
 static size_t object_index_max() {
-  return ZPageSizeMin >> ZObjectAlignmentSmallShift;
+  return ZGranuleSize >> ZObjectAlignmentSmallShift;
 }
 
 static size_t object_index(oop obj) {
   const uintptr_t addr = ZOop::to_address(obj);
   const uintptr_t offset = ZAddress::offset(addr);
-  const uintptr_t mask = (1 << ZPageSizeMinShift) - 1;
+  const uintptr_t mask = ZGranuleSize - 1;
   return (offset & mask) >> ZObjectAlignmentSmallShift;
 }
 
 ZHeapIteratorBitMap* ZHeapIterator::object_map(oop obj) {
   const uintptr_t addr = ZOop::to_address(obj);
< prev index next >