RFR: 8280106: G1: Make reclaiming memory functionality more general in G1SegmentedArrayFreePool and G1SegmentedArrayFreeMemoryTask

Hamlin Li mli at openjdk.java.net
Tue Jan 18 04:38:43 UTC 2022


We have planned to make memory reclaimation more general, and reuse it in evacuation failure processing after JDK-8254739.
Some of the work has already been done in JDK-8276670 and JDK-8277542.
But after JDK-8278917, there is no need to return the memory used by G1SegmentedArray in evacuation failure processing, as it uses another way to do it.
Currently, G1SegmentedArrayFreePool and G1SegmentedArrayFreeMemoryTask is half-bound to card set, and half-general, it should be made more general for the readability of the code and future possible reuse of this functionality returning memory (used by G1SegmentedArray) to OS.

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

Commit messages:
 - Make G1SegmentedArrayFreePool public for tests
 - Move G1SegmentedArrayMemoryStats nested in G1SegmentedArrayFreePool
 - Initial commit

Changes: https://git.openjdk.java.net/jdk/pull/7121/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7121&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280106
  Stats: 178 lines in 14 files changed: 56 ins; 39 del; 83 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7121.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7121/head:pull/7121

PR: https://git.openjdk.java.net/jdk/pull/7121



More information about the hotspot-gc-dev mailing list