Invoke downcall handle with custom memory layout requires arena in params

tison wander4096 at gmail.com
Sat Apr 6 09:13:55 UTC 2024


Hi,

This seems undocumented. As in [1], the native method signature is:
FunctionDescriptor.of(either, ValueLayout.ADDRESS).

And below when invoke the method handle, it requires: handle.invoke(arena,
arena.allocateFrom("name")

Where comes this extra param?

Best,
tison.

[1]
https://x.com/tisonkuncz/status/1776518595499217094
<https://x.com/tisonkuncz/status/1776518595499217094?s=46&t=rCbLrJSBayvO_CKE6XmYKQ>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240406/feada06e/attachment.htm>


More information about the panama-dev mailing list