RFR: 8350722: Remove duplicate SerialGC logic for detecting pointers in young gen

Saint Wesonga duke at openjdk.org
Wed Feb 26 06:59:09 UTC 2025


Checking whether a pointer is in the young generation is currently done by comparing the pointer to the end of the young generation reserved space. The duplication of these checks in various places complicates any changes the layout of the young generation since all these locations need to be updated. This PR replaces the duplicated logic with the DefNewGeneration::is_in_reserved method.

-------------

Commit messages:
 - Remove duplicate logic for detecting pointers in young gen

Changes: https://git.openjdk.org/jdk/pull/23792/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23792&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350722
  Stats: 18 lines in 3 files changed: 4 ins; 7 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/23792.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23792/head:pull/23792

PR: https://git.openjdk.org/jdk/pull/23792


More information about the hotspot-gc-dev mailing list