On Fri, 28 Jan 2022 06:08:55 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use Reference.reachabilityFence() instead of static field. > > test/hotspot/jtreg/resourcehogs/serviceability/sa/LingeredAppWithLargeArray.java > line 30: > >> 28: public static void main(String args[]) { >> 29: hugeArray = new int[Integer.MAX_VALUE/2]; >> 30: LingeredApp.main(args); > > Another option here is to use Reference.reachabilityFence(hugeArray). That > makes it a bit more explicit/obvious that the test needs to keep hugeArray > alive. Done! Also changed #7257 to do the same. ------------- PR: https://git.openjdk.java.net/jdk/pull/7236