Java memory Management for JNI -


i have 2 questions :

  1. what if have jni call method , jni method leaks memory. once method completes jvm garbage collector able memory back. heard jvm not manage heap space used jni ? memory used jni part of memory used java process ?

  2. is absolutely necessary use jni achieve ipc ? other popular java techniques or there open source library achieve shared memory in java ?

  1. no: "the jni framework not provide automatic garbage collection non-jvm memory resources allocated code executing on native side" (wikipedia).
  2. no, java has sockets , indeed processbuilder. shared memory can achieved mappedbytebuffer.

Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -