[foreign-memaccess+abi] RFR: 8266627: CLinker allocateMemory, freeMemory implementation should not use default lookup
Jorn Vernee
jvernee at openjdk.java.net
Thu May 6 18:12:58 UTC 2021
On Thu, 6 May 2021 16:48:39 GMT, Maurizio Cimadamore <mcimadamore 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.
LGTM
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)
-------------
Marked as reviewed by jvernee (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/527
More information about the panama-dev
mailing list