On Tue, 17 Nov 2020 09:07:03 GMT, Nick Gasson <[email protected]> wrote:
> I ran this test on a machine with 224 logical CPUs and it fails with:
>
> ITERATION 3
> test TestHandshake.testHandshake("SegmentMismatchAccessor",
> TestHandshake$$Lambda$57/0x00000001000e7968@37c4b344): failure
> java.lang.OutOfMemoryError: Cannot reserve 1000000 bytes of direct buffer
> memory (allocated: 536008192, limit: 536870912)
>
> SegmentMismatchAccessor allocates a 1MB native segment for each CPU on
> each iteration. This can quickly reach the allocation limit if there is
> no intervening GC. Explicitly close the segment after each iteration to
> release the memory.
@mcimadamore I'm not sure whether I should submit this here or panama-foreign,
but the fix applies to jdk master.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1254