Hi Paul, first of all, thanks for your comments and suggestions. Paul Gearon wrote: > We recently pulled most of this code out and put it into a single file. > > http://mulgara.org/svn/mulgara/trunk/src/jar/util/java/org/mulgara/util/io/MappingUtil.java > > Hopefully it's clear enough, but ask questions if there's anything too obtuse.
The clean(...) method uses sun.misc.Cleaner and MappingUtil.java imports it, so I assume this would work on with Sun/Oracle JVMs, am I correct? Some of the Jena users (and some of those having problems with memory mapped files on Windows) do not use Oracle JVM, so I guess that approach would not work for them. The last comment on http://bugs.sun.com/view_bug.do?bug_id=4724038 suggests a similar solution: ((sun.nio.ch.DirectBuffer) buf).cleaner().clean() It would be interesting to know if there are equivalent .cleaner().clean() methods in other JVMs, if so, someone might use reflection and route the .clean() method to the various internal objects. Or, are sun.misc.Cleaner and/or sun.nio.ch.DirectBuffer available in other JVMs? (I don't know) Thanks again, Paolo PS: I am a Linux users (from many, many years... my last Windows was Windows 98) so, sorry, but I cannot help testing this. I also tend to use Oracle's JVMs on 64-bits Linux OS and JVMs... which do not have the problem. ;-)
