[foreign-memaccess+abi] RFR: 8266627: CLinker allocateMemory, freeMemory implementation should not use default lookup

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu May 6 18:27:11 UTC 2021


On Thu, 6 May 2021 18:07:32 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> This patch removes the workaround on Windows which requires loading msvcrt.dll.
>> 
>> The solution is to create (Java side) a memory segment and fill it with function pointers on the VM side.
>> This way, Java code can look up VM functions easily. I've moved this support onto a different class, as the approach might, in the future, be required for other VM functions.
>
> src/java.base/share/native/libjava/VMFunctions.c line 27:
> 
>> 25: 
>> 26: #include <stdlib.h>
>> 27: #include <assert.h>
> 
> Curious; why is this assert.h include needed? (usually assert.h conflicts with hotspot's own assert)

No reason, I realized that I had it at some point but then cleaned up code... it's a leftover

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

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


More information about the panama-dev mailing list