<div dir="ltr">Hi I want to ask a question about using project-panama, I implemented a network library using JDK21 with panama-foreign and the performance are quite well, since the API will officially release in JDK22, I started to migrating my project to using JDK22-ea, and I have a question about using Linker.Option.isTrivial(), I noticed that in JDK22 it seems to be renamed as Linker.Option.critical(), the javadoc says the function should have an extremely short running time in all cases, and does not callback into Java. I am pretty sure that it could be used on some functions returning constants macro from C, but in some cases, I am not quite sure if this option could be used, here are some examples:<div><br></div><div>1. calling malloc() and free(), or some other API like epoll_create() and epoll_ctl()</div><div>2. calling send() and recv() on non-blocking sockets</div><div>3. just assigning some values to the target structs in C functions</div><div><br></div><div>They all have a very short running time, and they do not callback into Java, I have tested using Linker.Option.isTrivial() and they all went well, but I am still not very sure about my usage here, since I don't quite understand what Linker.Option.isTrivial() did under the hood, so I want to seek some suggestions from experts here.<br></div></div>