Does the JVM launch when invoking native code?

Are there any performance implications when calling machine code from Java bytecode? Since machine code is โ€œunmanagedโ€ and not โ€œawareโ€ of the internal components of Java, is this perhaps causing the internal JVM schedulers to stop or something like that?

I am new to Java, so maybe this is not even relevant, please help.

I know that in Erlang they have this problem when the virtual machine basically stops when it calls machine code calls. Hope this is not the case with Java. It?

+4
source share
1 answer

Threads that run on their own code will not stop the JVM.

JNI, Java _thread_in_native. safepoint, stop-the world (, ), JVM . , JVM, upcall JNI. , _thread_in_Java.

+7

Source: https://habr.com/ru/post/1652883/


All Articles