Regardless of whether a new process evolves from a JNI call

I am trying to call the C API from my java program using JNI. Can someone tell me if the API call invoked the internal process? ... I need this because my concurrent transactions will be very large, so if the new process is forked, then there will be so many new processes for each transaction.

+4
source share
1 answer

The advantage of using JNI is that both the calling program and the called program are executed in the same process (task), while other methods start a new process (task). This makes JNI faster at startup and less resource intensive. However, since Java applications run in a technology-independent machine interface (TIMI), and native user methods require the user address space to run, first a preload is required to create a user environment that uses 16-byte address pointers instead of 8-byte pointers used below TIMI. It just means that your reasons for using JNI should be based on more performance.

+3
source

All Articles