You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <ji...@apache.org> on 2015/10/19 00:14:05 UTC

[jira] [Comment Edited] (QPID-6800) Use cached direct buffers for message compression/decompression

    [ https://issues.apache.org/jira/browse/QPID-6800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14962653#comment-14962653 ] 

Rob Godfrey edited comment on QPID-6800 at 10/18/15 10:13 PM:
--------------------------------------------------------------

In QpidByteBufferOutputStream, line 95-97 you have:

{code}
final QpidByteBuffer current =
                        _isDirect ? QpidByteBuffer.allocate(size) : QpidByteBuffer.allocateDirect(
                        _maximumBufferSize); 
{code}

firstly aren't the allocations the wrong way round - allocating direct iff _isDirect is false, and why do we allocateDirect _maximumBufferSize and not size?




was (Author: rgodfrey):
In QpidByteBufferOutputStream, line 95-97 you have:

{code}
final QpidByteBuffer current =
                        _isDirect ? QpidByteBuffer.allocate(size) : QpidByteBuffer.allocateDirect(
                        _maximumBufferSize); 
{code}

firstly aren't the allocations the wrong way round - allocating direct iff _idDirect is false, and why do we allocateDiect _maximumBufferSize and not size?



> Use cached direct buffers for message compression/decompression
> ---------------------------------------------------------------
>
>                 Key: QPID-6800
>                 URL: https://issues.apache.org/jira/browse/QPID-6800
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Keith Wall
>            Assignee: Rob Godfrey
>             Fix For: qpid-java-6.0
>
>
> Currently when the 0-8..0-91 and 0-10 protocol engines compress/decompress message payloads on behalf of consumers, (non-cached) direct memory is allocated for the modified content and then shortly after released.  This approach is risky as the JVM may not release this memory in a timely manner and an OutOfMemoryError direct may occur.
> Switch the protocol engines to use cached direct memory for compressing/decompressing message payloads.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org