Skip to content

Decrease usedMemory of magazine when the chunk get deallocated#14508

Merged
normanmaurer merged 2 commits into
netty:4.1from
laosijikaichele:4.1-chunk-deallocate-usedmemory
Nov 27, 2024
Merged

Decrease usedMemory of magazine when the chunk get deallocated#14508
normanmaurer merged 2 commits into
netty:4.1from
laosijikaichele:4.1-chunk-deallocate-usedmemory

Conversation

@laosijikaichele
Copy link
Copy Markdown
Contributor

@laosijikaichele laosijikaichele commented Nov 26, 2024

Motivation:

For AdaptivePoolingAllocator, the magazine.usedMemory should be decreased when the chunk be deallocated or be offered to the centralQueue.

Modification:

Decreased the magazine.usedMemory when the chunk be deallocated or be offered to the centralQueue.

Result:

The magazine.usedMemory becomes more accurate.

@laosijikaichele laosijikaichele force-pushed the 4.1-chunk-deallocate-usedmemory branch from ba2ffaf to 03fe6a5 Compare November 27, 2024 03:58
Comment thread buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java
@normanmaurer normanmaurer merged commit 8e831a3 into netty:4.1 Nov 27, 2024
normanmaurer added a commit that referenced this pull request Nov 27, 2024
…ed to central queue (#14508)

Motivation:

For `AdaptivePoolingAllocator`, the `magazine.usedMemory` should be
decreased when the chunk be deallocated or be offered to the
`centralQueue`.

Modification:

Decreased the `magazine.usedMemory` when the chunk be deallocated or be
offered to the `centralQueue`.

Result:

The `magazine.usedMemory` becomes more accurate.

---------

Co-authored-by: laosijikaichele <laosijikaichele>
Co-authored-by: Norman Maurer <norman_maurer@apple.com>
normanmaurer added a commit that referenced this pull request Nov 27, 2024
#14515)

…ed to central queue (#14508)

Motivation:

For `AdaptivePoolingAllocator`, the `magazine.usedMemory` should be
decreased when the chunk be deallocated or be offered to the
`centralQueue`.

Modification:

Decreased the `magazine.usedMemory` when the chunk be deallocated or be
offered to the `centralQueue`.

Result:

The `magazine.usedMemory` becomes more accurate.

Co-authored-by: old driver <29225782+laosijikaichele@users.noreply.github.com>
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.

2 participants