0

I found this comment by iirekm https://stackoverflow.com/a/3926392/733861 He says "If you need inter-process shared memory, use mapped files."

Can anyone give an example how to do that? I found this but it does not show inter-process communication. http://javarevisited.blogspot.in/2012/01/memorymapped-file-and-io-in-java.html

Community
  • 1
  • 1
  • What have you tried so far? Do you have a problem with existing code? Stackoverflow is really for answers if you have (a) example input; (b) expected output; you can show (c) a code attempt at the problem; and (d) what the issue with the your attempted solution is. See ["What can I ask"](http://stackoverflow.com/help/on-topic), ["How to Ask"](http://stackoverflow.com/help/how-to-ask) and [this checklist](http://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist) for some guidance – Andy Brown Jan 21 '15 at 13:34
  • Andy plz see code given in javarevisited site. That code seems like it is using MappedByteBuffer to share data within application for faster read write access. But how to access that MappedByteBuffer data between different processes. May be I have not understood correctly but is it MappedByteBuffer which gets share or is it FileChannel or is it RandomAccessFile which gets share. Which object is shareable here with other process. – Rahul Kulshreshtha Jan 21 '15 at 15:44

0 Answers0