I just hit a bug on the JVM regarding Native Buffers allocations:
http://bugs.sun.com/view_bug.do?bug_id=6791815
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2009-January/000386.html
The current status is delivered. (I guess it doesn't mean fixed.. I don't think
it's already available at any version).
It only happens on JDK 1.6.
I'll keep a work around. The allocation needs to be synchronized. What shouldn't be a problem, as this is a really fast operation. I could allocate 100 million buffers in 1.5 seconds.
Maybe we will be able to remove the work around later, but shouldn't be a big deal.