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

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -

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

geospatial - MongoDB Bound Queries: How do I convert mile to radian? -