The zForwardingEntry::from_index field only needs 18 bits, as it only needs to be able to represent the largest object index, which is:
ZPageSizeSmall / MinObjectAlignment == 2M / 8 == 262144 == 1 << 18.
Shrinking the from_index allows us to grow the to_offset, which in turn allows us to increase the max heap size in the future. However, with these changes, we can no longer assume that (uint64_t)-1 is an empty entry. So we need to introduce a new flag to indicate if an entry is populated or not.
ZPageSizeSmall / MinObjectAlignment == 2M / 8 == 262144 == 1 << 18.
Shrinking the from_index allows us to grow the to_offset, which in turn allows us to increase the max heap size in the future. However, with these changes, we can no longer assume that (uint64_t)-1 is an empty entry. So we need to introduce a new flag to indicate if an entry is populated or not.
- relates to
-
JDK-8222180 ZGC: ZForwarding::verify() failing when checking for duplicates
-
- Resolved
-