This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: memory mapped i/o?


> The problem as I see it is that the memory region must be copied to/from
> a Java array to be useful.  This copy defeats the advantages of memory
> mapping somewhat.

In fact, it's contrary to the model I wanted:  Java directly accessing
the "memory", getting rid of that copy.  Having such a a byte array
would solve quite a lot of problems; arrays of larger primitives should
not be needed for quite a while.


>      It would be convenient to create primitive arrays
> directly mapped to a file, but gcj cannot easily do this because the
> array requires an object header.

And I'd guess that assumption is buried deep in the ABI, yes?  There'd
need to be a new ABI data type for such a thing, I'd guess.

I just did a bit more poking around.  It appears that the RealTime Java
API has some memory region APIs (chapter 5) that in principle ought to
be able expose memory mapped I/O ... or controller registers, etc.
Maybe someone's looked at GCJ in that context.

- Dave







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]