Skip to content

Auto-port 4.1: AdaptivePoolingAllocator: call unreserveMatchingBuddy(...) if byteBuf initialization failed#16331

Merged
chrisvest merged 1 commit into
4.1from
auto-port-pr-16327-to-4.1
Feb 21, 2026
Merged

Auto-port 4.1: AdaptivePoolingAllocator: call unreserveMatchingBuddy(...) if byteBuf initialization failed#16331
chrisvest merged 1 commit into
4.1from
auto-port-pr-16327-to-4.1

Conversation

@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port of #16327 to 4.1
Cherry-picked commit: 2e93f84


Motivation:
In BuddyChunk.readInitInto(...), we should call unreserveMatchingBuddy(...) if the byteBuf initialization failed, to unreserve the memory.

Modification:
Call unreserveMatchingBuddy(...) in the finally block.

Result:
Better memory utilization.

…Buf` initialization failed (#16327)

Motivation:
In `BuddyChunk.readInitInto(...)`, we should call
`unreserveMatchingBuddy(...)` if the `byteBuf` initialization failed, to
unreserve the memory.

Modification:
Call `unreserveMatchingBuddy(...)` in the `finally` block.

Result:
Better memory utilization.

Co-authored-by: lao <none>
(cherry picked from commit 2e93f84)
@chrisvest chrisvest enabled auto-merge (squash) February 21, 2026 17:58
@chrisvest chrisvest added this to the 4.1.132.Final milestone Feb 21, 2026
@chrisvest chrisvest merged commit da36b8d into 4.1 Feb 21, 2026
18 checks passed
@chrisvest chrisvest deleted the auto-port-pr-16327-to-4.1 branch February 21, 2026 21:56
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.

3 participants