If IOSessions are disposed of properly, ByteBufferAllocater can become ByteBufferManager & the ByteBuffers can be returned & recycled/reused.
Sam On Mon, Dec 14, 2009 at 10:20 AM, Oleg Kalnichevski <[email protected]>wrote: > Asankha C. Perera wrote: > >> Hi Oleg >> >>> Has anyone encountered this issue before? my immediate next step is to >>>> try on a 64bit OS version .. but I am curious to know how we could avoid >>>> this problem >>>> >>>> >>> Asankha, >>> >>> I think the easiest fix to the problem should be avoiding direct >>> bytebuffers altogether. Feel free to go ahead and patch SSLIOSession in >>> SVN trunk. >>> >>> >> Thanks for the reply, I still got the same issue with the 64 bit OS >> version too, so probably Ubuntu has something that causes the JVM to GC >> before its too late, which is not there in RHEL. As a temporary fix, I >> replaced the direct buffers with heap buffers which solved the problem, >> and I think it may indeed be the safer bet right now. >> >> thanks >> asankha >> >> > Asankha, > > Actually I do not think this should be seen as a temporary fix. Direct > buffers should be used for objects with a relatively long life span. I/O > sessions may well be short lived. Alternatively, feel free to change > SSLIOsession to make use of ByteBufferAllocator, which would allow for > customizable allocation strategies. > > Cheers > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
