RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator) [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Oct 8 10:29:25 UTC 2020


On Thu, 8 Oct 2020 06:53:41 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address review comments
>
> test/jdk/java/foreign/TestMismatch.java line 26:
> 
>> 24: /*
>> 25:  * @test
>> 26:  * @run testng/othervm -XX:MaxDirectMemorySize=5000000000 TestMismatch
> 
> Whoa, allocating 5 GB? That might fail on 32-bit platforms... Anyhow, this flag accepts suffixes, so
> `-XX:MaxDirectMemorySize=5g`.

I've done two things here:
* the limit isn't really doing much in this test, so I've removed
* I moved the limit in TestSegments; the limit is set to much lower threshold (2M) which should work regardless of 32/64
* For TestMismatch, which needs to allocate a segment bigger than 2^32 in one of the tests, I've added a guard in the
  offending test which verifies that we're indeed on a 64-bit platform

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

PR: https://git.openjdk.java.net/jdk/pull/548



More information about the security-dev mailing list