Forum Stats

  • 3,826,050 Users
  • 2,260,591 Discussions
  • 7,896,781 Comments

Discussions

Using non persisted memory mapped file in Java

user580550
user580550 Member Posts: 12
edited Apr 12, 2017 8:53AM in Java Programming

Ask Question

Hi All

I want to implement memory mapped file concept as a shared memory to share data between two processes running in my windows system. One in Java and another in native (C# layer).

Both are running processes and hence i want to use non persisted mechanism for memory mapped files instead of persisted file option (because a file poses a security threat ).

Java File Channels http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html#map(java.nio.channels.FileChannel.MapMode, long, long) has an option to map to an existing file.

C# has option to map both a persisted file and a simple alias named map for non persisted file. Please check here https://msdn.microsoft.com/en-us/library/dd997372(v=vs.110).aspx

So i am looking as how i can create a mapping for non persisted mechanism in Java.

Best Regards,

Saurav

Answers

This discussion has been closed.