memory mapped i/o?

Tom Tromey tromey@redhat.com
Fri Dec 15 13:21:00 GMT 2000


>>>>> "David" == David Brownell <david-b@pacbell.net> writes:

David> It's not been used or tested much, so "deep" problems won't
David> have shown their faces yet ... :-)

If you want to have the mmap'd memory show up as something other than
byte[], then you'll need to do some alignment computations here:

David> X    array = (jbyteArray) (data - sizeof *array);

In the current CVS, `length' is const and you can only assign to it
via a const_cast.  Here's the line that would have to change:

David> X    array->length = (jsize) statb.st_size;

I made this member const because it is conceptually more correct,
reduces the possibility of introducing a bug, and might make it
possible to optimize a little better in some situations.

Tom


More information about the Java mailing list