< prev index next >

src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.cpp

Print this page
rev 56944 : imported patch 8233702-function-to-clamp-value-to-range

@@ -142,11 +142,11 @@
 size_t ZPlatformAddressOffsetBits() {
   const size_t min_address_offset_bits = 42; // 4TB
   const size_t max_address_offset_bits = 44; // 16TB
   const size_t address_offset = ZUtils::round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
   const size_t address_offset_bits = log2_intptr(address_offset);
-  return MIN2(MAX2(address_offset_bits, min_address_offset_bits), max_address_offset_bits);
+  return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
 }
 
 size_t ZPlatformAddressMetadataShift() {
   return ZPlatformAddressOffsetBits();
 }
< prev index next >