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

Use more allocated buffers #18515

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Haoning-Sun
Copy link
Contributor

@Haoning-Sun Haoning-Sun commented Feb 8, 2024

What changes are proposed in this pull request?

Use more allocated buffers instead of directly allocating new memory.

Why are the changes needed?

If the value of BUF_POOL.ceilingEntry(length) is a empty list, removing this entry and continuing to look for the eligible buffer will reuse more allocated buffers, reducing the OutOfMemoryError exception caused by ByteBuffer.allocateDirect.

@Haoning-Sun Haoning-Sun changed the title Use more allocated buffer Use more allocated buffers Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant