Skip to content

Commit

Permalink
8337550: Add documentation to TestOutOfMemoryDuringInit.java
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes
  • Loading branch information
albertnetymk committed Aug 1, 2024
1 parent cf1230a commit 8eb5684
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ static class Nested {
static void forceInit() { }
static {
while (theList != null) {
// Use the minimal allocation size to push heap occupation to
// the limit, ensuring there is not enough memory to create the
// ExceptionInInitializerError that the VM tries to create when
// the clinit throws the OOM.
theList.add(new Object());
}
}
Expand Down

0 comments on commit 8eb5684

Please sign in to comment.