This is not a helpful response, I'm afraid, but may be useful anyway
. (EDIT: sorry but I have v.little time at the moment, so not enough time to go look up my own refs and past experiences; hopefully what I just spouted is at least slightly helpful)
Memory-mapping in 1.4.x has sufficiently many serious bugs as to be considered unusable by many people
. It's a bit like Socket NIO in 1.4.0 and 1.4.1 - there were so many bugs that it COULD NOT be used in real applications, unless you were willing to make huge concessions (one of which I recall was "never run on windows" in several not uncommon scenarios).
So, first port of call is the JDC Bug Parade and an hour of searching for outstanding mem-mapping bugs I'm afraid
. Pay particular attention to closed and wontfix bugs - IIRC there's a couple of those that smell more of engineers trying to avoid being the Sun employee who opens the can of worms ... than of things that are genuinely not bugs.
Finally, mem-mapping is often NOT better than using vanilla methods...so much so that IIRC the API docs currently say "we suggest you only use mem-mapping where you've experimentally determined that it definitely makes a large positive difference to your particular application".
i.e. mem-mapping is really still a "beta" technology in the JDK. From micro benchmarks I've seen and done, it can be hard to find situations where mem-mapping brings significant performance boosts. At a guess I'd say this is because it's one of those areas of the JDK which so far has had very few staff and so Sun haven't had time to do much more than "bare bones" implementations that are slow inefficient and buggy. (based upon extensive experience with the general rubbishness of the nio.* and socket nio.channels.*, and it's rapid evolution through successive 1.4.x point releases...)