[Red5devs] Pooled or heap ByteBuffers (svn r3265)?

mabrek mabrek at gmail.com
Thu Oct 23 01:36:58 PDT 2008


Allocator is globall so we can't set it per transport.
RTMPMinaTransport and MRTMPMinaTransport seem to be tunable, but they
use hardcoded
private static final boolean DEFAULT_USE_HEAP_BUFFERS = true;

On Wed, Oct 22, 2008 at 5:55 PM, Mondain <mondain at gmail.com> wrote:
> I believe the allocator stuff in RTMPMinaTransport is available for tweaking
> by Red5 implementers and since we don't force them to use Simple we have to
> make sure release() is called to prevent leaking. I agree that our default
> or recommended allocator be set at the beginning (Standalone or Bootstrap),
> but it can be overridden when the transport is configured.
> Paul
>
> On Wed, Oct 22, 2008 at 1:06 AM, mabrek <mabrek at gmail.com> wrote:
>>
>> MINA 1.1.x provides PooledByteBufferAllocator (Default) and
>> SimpleByteBufferAllocator. Since 2.0 they decided to remove
>> PooledByteBufferAllocator (see
>> http://mina.apache.org/changes-between-2x-and-1x.html for
>> explanation). Currently they recommend SimpleByteBufferAllocator for
>> better performance in 1.1.x (see
>> http://mina.apache.org/quick-start-guide.html). It allocates new
>> ByteBuffer every time so there is no need to release them, just make
>> sure there is no reference to allow GC them.
>> We have three calls to ByteBuffer.setAllocator(new
>> SimpleByteBufferAllocator()) : Standalone, RTMPMinaTransport,
>> MRTMPMinaTransport. Since it's static, one call during server startup
>> (Standalone or Bootstrap) is enough.
>>
>> _______________________________________________
>> Red5devs mailing list
>> Red5devs at osflash.org
>> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>
>
>
> --
> http://gregoire.org/
> http://osflash.org/red5
>
> _______________________________________________
> Red5devs mailing list
> Red5devs at osflash.org
> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>
>



More information about the Red5devs mailing list