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

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -