I am just a casual user of MINA but I come across looking at the source code
of PooledByteBufferAllocator when I found out that my app has been using a
lot non-heap memory which does not seem to release.

I believe direct buffers are not garbaged collected but in the current
implementation of PooledByteBufferAllocator, the stacks of direct buffers
are expired the same as heap buffers (in class
PooledByteBufferAllocator.Expirer, around line 260)

As long as direct buffers are not garbaged collected, would it be better NOT
to expire direct buffers - always keep their references and reuse them?

If direct buffers WERE released to the OS, I bet it wouldn't happen very
frequently - therefore current default of 60 seconds of timeout for direct
buffer does not look reasonable.
-- 
View this message in context: 
http://www.nabble.com/Concerns-about-pooling-and-expiring-direct-buffers-tf4225654s16868.html#a12020797
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to