Java memory Management for JNI -
i have 2 questions :
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 ?
is absolutely necessary use jni achieve ipc ? other popular java techniques or there open source library achieve shared memory in java ?
- no: "the jni framework not provide automatic garbage collection non-jvm memory resources allocated code executing on native side" (wikipedia).
- no, java has sockets , indeed processbuilder. shared memory can achieved mappedbytebuffer.
Comments
Post a Comment