RFR: 8313395: LotsUnloadTest.java fails with OOME transiently with libgraal

Doug Simon dnsimon at openjdk.org
Thu Jul 10 15:54:39 UTC 2025


On Wed, 9 Jul 2025 23:53:53 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> It seems like when libgraal is used as the JIT, more heap space is allocated in the Java heap to support JIT compilation. This causes OOM in the test when the heap is very small.
> 
> The test allocates 1024 * 2 MB of heap objects but at any time keeps only 8 MB of them alive. The test expects class unloading would happen when the heap is filled with garbage. By increasing the heap size from 64MB to 256MB, we can still accomplish what the test wants to do but will be more friendly to libgraal.
> 
> The fact that libgraal uses more memory is still a concern, but that should be tested elsewhere, and is not the responsibility of this test.

Marked as reviewed by dnsimon (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/26230#pullrequestreview-3006346093


More information about the hotspot-runtime-dev mailing list