This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: memory mapped i/o?
>>>>> "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