java - Allocating memory outside JVM and using it inside JVM -


is possible create persistent memory object outside jvm memory can used inside jvm object, survives jvm restart?

particular idea can allocate memory outside jvm , use jni interface access memory , associate, say, java array it.

did try perform such hack? platform dependency suffice.

for example, can perform optimization of in-memory db loading during restart of jvm process.

yes, possible, without jni.

the idea have mappedbytebuffer backed "file" on tmpfs filesystem. e.g. on linux can use /dev/shm (or /run/shm) mountpoint that.

the performance of such mappedbytebuffer same other direct bytebuffers, persist jvm restart, i.e. can map "file" again in new jvm. (i write "file" in quotes, because looks regular file application, shared memory region resides in ram). actively use technique our production in-memory caches.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -