Any concept of shared memory in Java

后端 未结 10 542
猫巷女王i
猫巷女王i 2020-11-29 05:33

AFAIK, memory in Java is based on heap from which the memory is allotted to objects dynamically and there is no concept of shared memory.

If there is no concept of s

10条回答
  •  我在风中等你
    2020-11-29 06:06

    MappedBus (http://github.com/caplogic/mappedbus) is a library I've added on github which enable IPC between multiple (more than two) Java processes/JVMs by message passing.

    The transport can be either a memory mapped file or shared memory. To use it with shared memory simply follow the examples on the github page but point the readers/writers to a file under "/dev/shm/".

    It's open source and the implementation is fully explained on the github page.

提交回复
热议问题