Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer direct io buffers if direct buffers pooled #9167

Merged
merged 1 commit into from May 22, 2019

Commits on May 21, 2019

  1. Prefer direct io buffers if direct buffers pooled

    Motivation
    
    Direct buffers are normally preferred when interfacing with raw
    sockets. Currently netty will only return direct io buffers (for reading
    from a channel) when a platform has unsafe. However, this is
    inconsistent with the write-side (filterOutboundMessage) where a direct
    byte buffer will be returned if pooling is enabled. This means that
    environments without unsafe (and no manual netty configurations) end up
    with many pooled heap byte buffers for reading, many pooled direct byte
    buffers for writing, and jdk pooled byte buffers (for reading).
    
    Modifications
    
    This commit modifies the AbstractByteBufAllocator to return a direct
    byte buffer for io handling when the platform has unsafe or direct byte
    buffers are pooled.
    Tim-Brooks committed May 21, 2019
    Copy the full SHA
    eec090d View commit details
    Browse the repository at this point in the history