?
Solved

shmem and mmap

Posted on 1997-08-29
2
Medium Priority
?
602 Views
Last Modified: 2006-11-17
Is there a package that provides the same functionality
as "shmem" (shared memory) and "mmap" (memory mapped
file I/O)?  Or are these capabilities too Unix-specific
to be available in Java?
0
Comment
Question by:xorcon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
rembo earned 200 total points
ID: 1225999


As far as performing the same functionality as shmem and
mmap, yes, they are too UNIX-specific.  However, since
Java is multithreaded and has good straightforward networking
capabilities, you can use either Threads or multiple apps
using socket() connections to perform inter-process
communication.

As for mmap, what is it you would like to do?  In terms
of mapping a file into memory and the doing reads on
it as if it were local memory, there is no capability
for that.  There is random access file I/O, but it will
not give you the kind of performance you've come to
expect from mmap.

Sorry :)

-Tony


0
 

Author Comment

by:xorcon
ID: 1226000
I figured this was true.  Shmem is much faster for local
inter-process communication than sockets are.  And mmap
is a good way to access the contents of a huge file, putting
the burden of I/O and caching on the O/S.  Unfortunately,
the designers of Java have yet to address efficiency -- even
JIT produces code 3-5 times slower than the equivalent
C application (IRIX 6.2, SGI R10K processor).
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question