RFR: 8315431: ArchiveHeapWriter::get_filler_size_at() cannot handle buffer expansion

Ioi Lam iklam at openjdk.org
Tue Apr 23 15:51:38 UTC 2024


In `ArchiveHeapWriter::maybe_fill_gc_region_gap()`:

- The address of `filler` will change if the buffer (which is a GrowableArrayCHeap) expands.
- Instead of storing the address, we store the offset of `filler` from the beginning of the buffer. This offset will not change even if the buffer expands.

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

Commit messages:
 - 8315431: ArchiveHeapWriter::get_filler_size_at() cannot handle buffer expansion

Changes: https://git.openjdk.org/jdk/pull/18920/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18920&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8315431
  Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/18920.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18920/head:pull/18920

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


More information about the hotspot-runtime-dev mailing list