[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: ByteBuffer.allocateDirect ridiculously slow
timfox
do-not-reply at jboss.com
Tue Mar 3 05:12:50 EST 2009
>From the java.nio.ByteBuffer javadoc (my emphasis added):
anonymous wrote :
| A direct byte buffer may be created by invoking the allocateDirect factory method of this class. The buffers returned by this method typically have somewhat higher allocation and deallocation costs than non-direct buffers. The contents of direct buffers may reside outside of the normal garbage-collected heap, and so their impact upon the memory footprint of an application might not be obvious. It is therefore recommended that direct buffers be allocated primarily for large, long-lived buffers that are subject to the underlying system's native I/O operations. In general it is best to allocate direct buffers only when they yield a measureable gain in program performance.
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214446#4214446
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214446
More information about the jboss-dev-forums
mailing list