Skip to content
Permalink
Browse files
8280553: resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.jav…
…a can fail if GC occurs

Reviewed-by: alanb, amenkov
  • Loading branch information
plummercj committed Jan 29, 2022
1 parent 268880b commit be9f984caec32c3fe1deef30efe40fa115409ca0
Showing 1 changed file with 4 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,12 @@

import jdk.test.lib.apps.LingeredApp;

import java.lang.ref.Reference;

public class LingeredAppWithLargeArray extends LingeredApp {
public static void main(String args[]) {
int[] hugeArray = new int[Integer.MAX_VALUE/2];
LingeredApp.main(args);
Reference.reachabilityFence(hugeArray);
}
}

1 comment on commit be9f984

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on be9f984 Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.