[foreign-abi] RFR: 8248421: CSupport should have a way to free memory allocated outside Java [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Aug 10 15:12:00 UTC 2020


On Mon, 10 Aug 2020 15:04:28 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

>> Added CSupport.freeMemoryRestricted utility method.
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last
> revision:
>   added CSupport.allocateMemoryRestricted

test/jdk/java/foreign/TestFree.java line 45:

> 44:
> 45:     public void test() throws Throwable {
> 46:         String str = "hello world";

While the test is fine, note that we have an existing test: TestNative, which uses Unsafe::allocateMemory/freeMemory to
build unsafe segments; perhaps it would be more robust to tweak that test to use the new routines ?

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

PR: https://git.openjdk.java.net/panama-foreign/pull/281


More information about the panama-dev mailing list