Skip to content

use netty PlatformDependent.estimateMaxDirectMemory#15237

Closed
hezhangjian wants to merge 1 commit intoapache:masterfrom
hezhangjian:use-netty-estimate-memory
Closed

use netty PlatformDependent.estimateMaxDirectMemory#15237
hezhangjian wants to merge 1 commit intoapache:masterfrom
hezhangjian:use-netty-estimate-memory

Conversation

@hezhangjian
Copy link
Copy Markdown
Member

Motivation

  • PlatformDependent.maxDirectMemory() can be inaccurate if io.netty.maxDirectMemory are setted
  • Bookkeeper's DirectMemoryUtils is not worked within some jdk releases.
    In netty 4.1.75, they introduced a new method PlatformDependent.estimateMaxDirectMemory to help users get maxDirectMemory. Since netty's this method works well on many jdk releases, use this to replace below two.
    PS: DirectMemoryUtils has been removed from bookkeeper in Use netty maxDirectMemory instead of DirectMemoryUtils bookkeeper#2989

Modifications

  • use PlatformDependent.estimateMaxDirectMemory instead

@hezhangjian hezhangjian added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Apr 20, 2022
@apache apache deleted a comment from github-actions Bot Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant